<div><div dir="auto">Interesting. I will think more about this before giving an opinion about your proposal. But in the meantime I wonder, what if every package had a dictionary of preferences? Would that work with the way you arranged your code in your packages? I think this could also address some of Gerald’s concerns regarding modularity.</div></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 4 Jun 2022 at 4:17 PM Hilaire Fernandes via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div text="#000000" bgcolor="#FFFFFF">
<p><font size="4" style="color:rgb(0,0,0)">Hi</font></p>
<p><font size="4" style="color:rgb(0,0,0)">Below redesign proposals to the PreferenceNG class
and its protocol:<br>
</font></p>
<p><font size="4" style="color:rgb(0,0,0)">1) In the PreferenceNG class, ThePreferences class
variable is a dictionary of dictionaries where its keys are the
category name.</font><font size="4" style="color:rgb(0,0,0)"><br>
</font></p>
<p><font size="4" style="color:rgb(0,0,0)">2) A preference is instantiated/updated
identically with the messages
#name:description:category:type:value: and</font><font size="4" style="color:rgb(0,0,0)"><font size="4" style="color:rgb(0,0,0)"> #name:category:value: </font></font></p>
<p><font size="4" style="color:rgb(0,0,0)">3) To access a preference instantiated in the base
image, nothing change:</font></p>
<p><font size="4" face="monospace" style="font-family:monospace;color:rgb(151,8,45)"> PreferenceNG
at: #color</font></p>
<p><font size="4" style="color:rgb(0,0,0)">Internally PreferenceNG searches for the
preference only in the base image preference categories:
#system, #programming, #gui, #font.</font></p>
<p><font size="4" style="color:rgb(0,0,0)">To access a preference in non base image category
I propose the message #at:in: #at:in:put, #instanceAt:in:<br>
</font></p>
<p><font size="4" style="color:rgb(0,0,0)"> <font face="monospace" style="font-family:monospace;color:rgb(151,8,45)">PreferenceNG
at: #textSize in: #zork<br>
</font></font></p>
<p><font size="4" face="monospace" style="font-family:monospace;color:rgb(151,8,45)"> PreferenceNG
at: #textSize in: #zork put: 12</font></p>
<p><font size="4" style="color:rgb(0,0,0)"> (the instantiate method can still be used to
edit a preference value: <br>
<font style="color:rgb(166,29,64)"> <font face="monospace" style="font-family:monospace;color:rgb(166,29,64)"> PreferenceNG
name: #textSize category: #zork value: 12)</font></font></font></p>
<p><font size="4" style="color:rgb(0,0,0)">Then I propose shortcuts compatible with the
existing protocol:</font></p>
<p><font size="4" style="color:rgb(0,0,0)"><font style="color:rgb(166,29,64)"><font face="monospace" style="font-family:monospace;color:rgb(166,29,64)"> </font></font></font><font size="4" face="monospace" style="font-family:monospace;color:rgb(166,29,64)">Preference at:
#zork:textSize</font></p>
<p><font size="4" face="monospace" style="font-family:monospace;color:rgb(166,29,64)"><font size="4" style="font-family:monospace;color:rgb(166,29,64)">
Preference at: #zork:textSize put: 16</font></font></p>
<p><font size="4" face="monospace" style="font-family:monospace;color:rgb(166,29,64)"><font size="4" style="font-family:monospace;color:rgb(166,29,64)"><font size="4" style="font-family:monospace;color:rgb(166,29,64)"> Preference instanceAt: #zork:textSize</font></font></font></p>
<p>I will have to write a method to move the preferences in their
own category dictionaries.</p>
<p>Comments?</p>
<p>Thanks<br>
</p></div><div text="#000000" bgcolor="#FFFFFF">
<p>Hilaire<br>
</p>
<pre cols="72" style="font-family:monospace">--
GNU Dr. Geo
<a href="http://drgeo.eu" style="font-family:monospace" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" style="font-family:monospace" target="_blank">http://blog.drgeo.eu</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>
</div>