MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work

dtrussardi@tiscali.it
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 ?
 
" I thinks to found the same problem with MAMultipleOptionsDescription "
 
 
Thanks for any consideration,
 
Dario


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: MASingleOptionDescription optionsAndLabels asDynamicObject d'ont work

Lukas Renggli-2

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