<div dir="ltr">Hi folks!<div><br></div><div>I'm somewhat late to the party. I went through the discussion and what worries me about the current proposal is that loading packages or filing in code that was developed under a particular setting might break in other images.</div><div>Also, this opens the door for creating other settings for the language, making it more difficult to understand or extend (IMHO).</div><div><br></div><div>My $0.02: how about using the machinery we already have, and letting classes define their parser by overriding #parserClass?</div><div>That way, we can use any parser we want (and customize it to tailor our needs) and it'll play nice (i think) with file outs and packages.</div><div><br></div><div>Best,</div><div>Nico PM </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 14, 2022 at 12:50 PM Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
On 5/14/2022 4:13 AM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote type="cite">
<p> Yes it is fine. </p>
<p> I am wondering: when executing "PreferenceNG initialize" in an
image with vector graphics it seems to break the image. I guess
a race condition. </p>
<p> To avoid this situation, I suggest you edit this method as
follow: </p>
<p> PreferenceNG>>initialize<br>
ThePreferences ifNil: [ThePreferences _ Dictionary new].<br>
... <br>
</p>
<p> It will allow to add the new preferences from the data array
and reset the existing ones with the default values from the
array (this what happen when requesting a new preference already
in the system, it just updates the existing one). A few
limitation: </p>
<ul>
<li> It will not migrate type of existing preference (should be
done by hand by inspecting the object or removing the whole
preference and initialize again), I prevent it by purpose so a
user does not mess up with the type. </li>
<li> it will not remove deprecated preferences (the ones not
anymore in the data array). Should be removed by hand.<br>
</li>
</ul>
<p>Hilaire<br>
</p>
<div>Le 13/05/2022 à 22:42, Juan Vuletich via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite">Hilaire,
please check that the use of Preference NG is reasonable.<br>
</blockquote>
<pre>--
GNU Dr. Geo
<a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" target="_blank">http://blog.drgeo.eu</a></pre>
</blockquote>
<br>
I think that #initialize should discard everything and start anew.<br>
<br>
Please review the attach. It creates a new dictionary, populates it,
and only then installs it as the new ThePreferences. This is a
pattern that has been used in Squeak/Cuis many times.<br>
<br>
BTW, I removed #select:, and renamed #all to #allPreferences. I
think this makes the stuff easier to find with senders/implementors
(by reducing false polymorphism). I kept your author initials, as
this is essentially just some refactoring.<br>
<br>
Thanks,<br>
<pre cols="72">--
Juan Vuletich
<a href="http://www.cuis-smalltalk.org" target="_blank">www.cuis-smalltalk.org</a>
<a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a href="https://github.com/jvuletich" target="_blank">https://github.com/jvuletich</a>
<a href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a href="https://independent.academia.edu/JuanVuletich" target="_blank">https://independent.academia.edu/JuanVuletich</a>
<a href="https://www.researchgate.net/profile/Juan-Vuletich" target="_blank">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a href="https://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="https://twitter.com/JuanVuletich" target="_blank">https://twitter.com/JuanVuletich</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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><br>Nicolás Papagna</div>