<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Have you taken into account that receiver and arguments of
#when:send:to: and friends are only held weakly? This means that if
there is no other (strong) reference to them, they can be garbage
collected anytime and will become nil. This is not "corruption", but
how #when:send:to: works. I believe (not absolutely sure) it is the
same in other Smalltalk dialects.<br>
<br>
HTH,<br>
<br>
On 5/25/2022 6:43 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:72a8cbad-3bc3-e547-b50c-4779c47174d3@drgeo.eu"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<p> Hi,<br>
</p>
<p> I can't make sense of the situation. </p>
<p> From the preference browser: </p>
<ul>
<li> when visiting the #gui category, action map for the drop
down list is fine. </li>
<li> when visiting the #programming category, action map for the
same drop down lists of other preferences is corrupted
(missing arguments). </li>
</ul>
<p> The used code is the same when browsing these categories. </p>
<p> I commited the code in ui/tools/preferenceBrowser repo with an
inspect to observe this difference of behavior: </p>
<pre> visitArrayPreference: aPref
| list listMorph |
aPref isTypeAClass ifTrue: [^ self visitArrayClassPreference: aPref].
listMorph _ DropDownListMorph
model: (list _ ListModel with: aPref type)
listGetter: #list
indexGetter: #listIndex
indexSetter: #listIndex: ::
autoDeselect: false;
setBalloonText: aPref description.
list listIndex: (aPref type indexOf: aPref value).
list when: #listSelectionChanged send: #changedList:for: to: self withArguments: {list. aPref}.
<b> list actionMap inspect.</b>
views at: aPref name capitalized put: listMorph
</pre>
<p> aPref (missing in some actionMap) is a preference instance,
therefore stored in the PreferenceNG class.<br>
</p>
<p> I tried to debug, actionmap build up code not easy to
understand and then actionMap is not corrupted when executing
step by step :-o <br>
</p>
<p> Hilaire<br>
</p>
<p> <br>
</p>
<div>Le 21/05/2022 à 17:26, Juan Vuletich a écrit :<br>
</div>
<blockquote type="cite" cite="mid:628904A4.6020002@zoho.com">The
event system holds receiver and arguments weakly. If there is no
other reference to them, they get garbage collected. <br>
</blockquote>
<pre>--
GNU Dr. Geo
<a moz-do-not-send="true" href="http://drgeo.eu">http://drgeo.eu</a>
<a moz-do-not-send="true" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
<a class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a class="moz-txt-link-freetext" href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
<a class="moz-txt-link-freetext" href="https://twitter.com/JuanVuletich">https://twitter.com/JuanVuletich</a></pre>
</body>
</html>