[Cuis-dev] Primitive fail when:send:to:withArguments:

Hilaire Fernandes hilaire at drgeo.eu
Wed May 25 14:43:33 PDT 2022


Hi,

I can't make sense of the situation.

 From the preference browser:

  * when visiting the #gui category, action map for the drop down list
    is fine.
  * when visiting the #programming category, action map for the same
    drop down lists of other preferences is corrupted (missing arguments).

The used code is the same when browsing these categories.

I commited the code in ui/tools/preferenceBrowser repo with an inspect 
to observe this difference of behavior:

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}. * list 
actionMap inspect.*     views at: aPref name capitalized put: listMorph

aPref (missing in some actionMap) is a preference instance, therefore 
stored in the PreferenceNG class.

I tried to debug, actionmap build up code not easy to understand and 
then actionMap is not corrupted when executing step by step :-o

Hilaire


Le 21/05/2022 à 17:26, Juan Vuletich a écrit :
> The event system holds receiver and arguments weakly. If there is no 
> other reference to them, they get garbage collected.

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220525/16797e29/attachment-0001.htm>


More information about the Cuis-dev mailing list