5 May 23:40
Re: MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work
From: Lukas Renggli <renggli <at> iam.unibe.ch>
Subject: Re: MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work
Newsgroups: gmane.comp.lang.smalltalk.smallwiki
Date: 2008-05-05 21:40:40 GMT
Subject: Re: MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work
Newsgroups: gmane.comp.lang.smalltalk.smallwiki
Date: 2008-05-05 21:40:40 GMT
On May 5, 2008, at 15:46 , Dario Trussardi wrote: > Hi All, > > i have one description based on MASingleOptionDescription. > > Now it work well when define the items with the options: > [ MACityModel DataBase asArray] asDynamicObject. > > But because i need to view more text for any item in the list, > i define the options with the method > > optionsAndLabels:[( MACityModel DataBase asArray) collect:[:itm| > Association key: itm value: itm display]] asDynamicObject > > With it the list is right create but d'ont update at " dynamic time > " with new item or change to MACityModel DataBase items. > > How i can solve my problem ? If you look at #optionsAndLabels: you see that the code disassembles the list. #options: does not do that. So if you want to use #optionsAndLabels: you can't use #asDynamicObject. As you can read in the FAQ I discourage to use #asDynamicObject anyway. http://www.lukas-renggli.ch/smalltalk/magritte/faq I suggest to use option (1). Cheers, Lukas -- -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki
RSS Feed