[Cuis-dev] [Preference] Category as domain name
Hilaire Fernandes
hilaire at drgeo.eu
Sat Jun 4 02:17:20 PDT 2022
Hi
Below redesign proposals to the PreferenceNG class and its protocol:
1) In the PreferenceNG class, ThePreferences class variable is a
dictionary of dictionaries where its keys are the category name.
2) A preference is instantiated/updated identically with the messages
#name:description:category:type:value: and#name:category:value:
3) To access a preference instantiated in the base image, nothing change:
PreferenceNG at: #color
Internally PreferenceNG searches for the preference only in the base
image preference categories: #system, #programming, #gui, #font.
To access a preference in non base image category I propose the message
#at:in: #at:in:put, #instanceAt:in:
PreferenceNG at: #textSize in: #zork
PreferenceNG at: #textSize in: #zork put: 12
(the instantiate method can still be used to edit a preference value:
PreferenceNG name: #textSize category: #zork value: 12)
Then I propose shortcuts compatible with the existing protocol:
Preference at: #zork:textSize
Preference at: #zork:textSize put: 16
Preference instanceAt: #zork:textSize
I will have to write a method to move the preferences in their own
category dictionaries.
Comments?
Thanks
Hilaire
--
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/20220604/ebb665c4/attachment.htm>
More information about the Cuis-dev
mailing list