[Cuis-dev] The Preference model

Hilaire Fernandes hilaire at drgeo.eu
Thu Apr 28 10:31:26 PDT 2022


Hi Mariano & al,

Okay I incompletely read and understood your suggestion. It looks like 
this is a good way to go and I like the idea too :)

To sum up, the ideas (correct when wrong):

  * Add a 'prefrerenceType' or just 'type' instance variable to the
    Preference class. It can be a symbol or reference to a class
    (String, Boolean) or instance ({'foo'. 'bar'.'baz'},
    (Interval from: 0 to: 100))
  * Purge the Preferences class side methods
  * Use a dictionary like protocol to access the preference instances
    and its value
  * Make Preferences instance side defined, so we can have load/save
    features

That's for the basic that should go in Cuis. Complete with the missing 
point.

Hilaire

Le 28/04/2022 à 15:24, Mariano Montone via Cuis-dev a écrit :
> 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.

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220428/81a992e4/attachment-0001.htm>


More information about the Cuis-dev mailing list