[Cuis-dev] [Preference] Category as domain name
Luciano Notarfrancesco
luchiano at gmail.com
Sun Jun 19 07:01:54 PDT 2022
To clarify a bit more, ThePreferences would turn into an instance variable
of PreferenceDictionary (with a more appropriate name, I guess) and there
would be no singletons anymore because it would make sense to have multiple
instances of PreferenceDictionary (one global called Preferences and for
example another one for DrGeo preferences or for other
packages/projects/apps)
On Sun, 19 Jun 2022 at 8:58 PM Luciano Notarfrancesco <luchiano at gmail.com>
wrote:
> Hi Hilaire, actually I was proposing to move the class side of
> PreferenceNG to a new class PreferenceDictionary, and then make a global
> Preferences just an instance of PreferenceDictionary (Smalltalk at:
> #Preferences put: PreferenceDictionary new). I don’t see the need for an
> extra singleton class. Also, a tool to view and edit preferences could work
> on any instance of PreferenceDictionary, maybe even on a list of instances
> of PreferenceDictionary if that makes sense in your UI design.
>
> On Sun, 19 Jun 2022 at 8:47 PM Hilaire Fernandes via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Hi Luciano,
>>
>> Was busy elsewhere, sorry it took so long, but I wanted to take the
>> needed time to respond appropriately.
>>
>> So if I interpret correctly, we should have two classes:
>> PreferenceDictionary and Preferences.
>>
>> We move most of the PreferenceNG general behavior in PreferenceDictionary
>> class, the behavior specific to the system preferences is moved to the
>> Preferences class (data preference and related behavior when a system
>> preference is changed).
>>
>> Preferences is then a subclass of PreferenceDictionary, to inherit the
>> general behavior to a preference.
>>
>> The "ThePreference" dictionary class variable we have in PreferenceNG is
>> changed to an instance variable of PreferenceDictionary: System
>> preferences and application preference use their own dictionary.
>>
>> Likely Preferences class is turned as a singleton, to avoid multiple
>> instance of Preferences.
>>
>> Is it more or less what you have in mind?
>>
>> Thanks
>>
>> Hilaire
>> Le 10/06/2022 à 23:17, Luciano Notarfrancesco a écrit :
>>
>> Hi Hilaire,
>>
>> I was thinking more on the lines of moving the methods in PreferenceNG
>> class to some new class, say PreferenceDictionary, and then having a global
>> instance Preferences for the base image, and another instance of
>> PreferenceDictionary for DrGeo. My first idea before giving it much thought
>> was to add a new instance variable to CodePackage but now that seems
>> totally unnecessary.
>>
>>
>> --
>> GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
>>
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220619/11754709/attachment.htm>
More information about the Cuis-dev
mailing list