[Cuis-dev] [Preference] Category as domain name

Hernan Wilkinson hernan.wilkinson at 10pines.com
Wed Jun 8 07:04:45 PDT 2022


I agree with Juan's proposal.

On Tue, Jun 7, 2022 at 3:04 PM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi Hilaire,
>
> I'm not happy about this proposal.
>
> I think Preferences (both old and new) have a problem. The name clashing
> you see is a symptom of the problem. But the problem is having all packages
> use the central Preferences mechanism.
>
> Your proposal makes me remember the Windows Registry: A central repository
> of preferences/options/configurations for all apps in the system. It also
> has a hierarchical structure to support multiple users. Some of the
> problems of this approach (in particular in Windows) are:
> - Modifying anything there is very dangerous. A single mistake could break
> the whole system beyond repair. So, everybody is really afraid of touching
> it.
> - Anyone could modify stuff that isn't their business at all
> - When you remove an app, in many cases they leave garbage there
> - Sometimes you completely uninstall an app to solve some problem, and you
> reinstall it afterwards. The problem is never solved because it was garbage
> left in the Registry and never cleaned. Only solution is to format disk and
> reinstall Windows (and losing everything else, of course)
>
> I think it would be much better, as Luciano also suggests, to use the
> central Preference registry only for the base image, and have a good way to
> let packages have their own.
>
> Thanks,
>
> On 6/4/2022 6:17 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> 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. Geohttp://drgeo.euhttp://blog.drgeo.eu
>
>
>
> --
> Juan Vuletichwww.cuis-smalltalk.orghttps://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Devhttps://github.com/jvuletichhttps://www.linkedin.com/in/juan-vuletich-75611b3https://independent.academia.edu/JuanVuletichhttps://www.researchgate.net/profile/Juan-Vuletichhttps://patents.justia.com/inventor/juan-manuel-vuletichhttps://twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
<https://10pines.com/>Hernán WilkinsonSoftware Developer & Coach

Alem 896, Floor 6, Buenos Aires, Argentina

+54 11 6091 3125

@HernanWilkinson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220608/f13b9299/attachment.htm>


More information about the Cuis-dev mailing list