settings vunerable to changes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

settings vunerable to changes

keith1y
I have found it difficult to change the settings descriptions for
existing components.

In case you are interested I added this to help

Keith

----

PRWidget-readUsing: aDescription
    ^ self properties at: aDescription ifAbsent: [
       
        self properties keysAndValuesDo: [ :k :v |
           
            (k accessor selector = aDescription accessor selector)
ifTrue: [ ^v ].
            (k label = aDescription label) ifTrue: [ ^ v ].
        ].
           
            aDescription default yourself
]

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: settings vunerable to changes

Lukas Renggli-2
> I have found it difficult to change the settings descriptions for
> existing components.
>
> In case you are interested I added this to help

I don't know what you mean by changing the settings descriptions?

If you want to customize or disable descriptions from an extension  
you can do it the standard way:

Foo class>>descriptionFoo (in the original package)
        ^ MADescription ...

Foo class>>descriptionFooExtension: aDescription (in your extension,  
shares the same prefix as the original method)
        ^ aDescription changeSomething

Lukas


>
> Keith
>
> ----
>
> PRWidget-readUsing: aDescription
>     ^ self properties at: aDescription ifAbsent: [
>
>         self properties keysAndValuesDo: [ :k :v |
>
>             (k accessor selector = aDescription accessor selector)
> ifTrue: [ ^v ].
>             (k label = aDescription label) ifTrue: [ ^ v ].
>         ].
>
>             aDescription default yourself
> ]
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki