[Cuis-dev] The Preference model

Mariano Montone marianomontone at gmail.com
Thu Apr 28 06:24:35 PDT 2022


El 28/4/22 a las 06:13, Hilaire Fernandes via Cuis-dev escribió:
> Using PreferenceType I fail to understand how it will reduce the 
> quantity of needed classes to represent the whole model: a hierarchy 
> of Preference or a hierarchy of TypePreference. The advantage of the 
> former approach, the code is easier to understand as the behavior is 
> concentrated in one class. 

What I'm proposing is no hierarchy at all. Neither for Preference or 
PreferenceType.

I'm proposing adding a 'preferenceType' instance variable to Preference, 
and bind that to Smalltalk classes, like Boolean, String, Integer, 
Color. Or instances of Array for list of options. Or something else that 
can be handled by some tool.

Then it is up to the tools then to use that information for building 
widgets the way they like.


Mariano



More information about the Cuis-dev mailing list