MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work
Lukas Renggli
renggli at iam.unibe.ch
Mon May 5 23:40:40 MEST 2008
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
More information about the smallwiki
mailing list