[Cuis-dev] The Preference model
Mariano Montone
marianomontone at gmail.com
Wed Apr 27 09:00:40 PDT 2022
El 27/4/22 a las 12:43, Luciano Notarfrancesco via Cuis-dev escribió:
> Good idea. Then a package that implements a tool to browse and edit
> preferences could implement methods in Boolean class, Integer class,
> Interval, etc, and delegate to the preference type the building of the
> corresponding GUI components.
Yes. And with some reflection and a visitor you may not need to touch
any classes. Something like:
MyPreferenceTypeVisitor>>visit: aPreferenceType
|visitorSelector|
visitorSelector := ('visit', aPreferenceType class className, ':')
asSymbol.
^ self perform: visitorSelector with: aPreferenceType
More information about the Cuis-dev
mailing list