[Cuis-dev] The Preference model

Hilaire Fernandes hilaire at drgeo.eu
Thu Apr 28 10:53:32 PDT 2022


Le 28/04/2022 à 16:59, ken.dickey--- via Cuis-dev a écrit :
> I was thinking of something very simple.
>   A setter which takes a prop and a new value
>   An informer, which notifies on value change
>
> Attached is a design sketch (I sketch in code ;^).
>
> Where does this come up short?


Hi Ken,

We want to also consider the type of preference, that's the one main 
focus. Read my other email, it sums up the ideas that emerged.

In your example you get rid of Preferences class, and use a class 
variable dictionary in the Preference. Interesting idea, I can't 
evaluate now the drawback, if any, of such a radical option ;-)

Why an informee closure, should not triggering an event at each 
preference value change be enough? Because setter is a block closure 
too? The extensive use of closure makes the code hard to understand, at 
least for me. Let's see what other think about it.

Wish you good recover

Hilaire


>
> What refinements might be required?
>
> Is there a simpler way?
>
> Good on ya,
> -KenD
>
> PS: Again, my eyes are a bit wacky.  Please do the real work of making 
> this useful. Thkx! 

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu



More information about the Cuis-dev mailing list