Rép: How to display Dictionary using TreeModel

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

Rép: How to display Dictionary using TreeModel

Julien Delplanque
Hi, try something like:

tm := TreeModel new.
tm roots: yourCollection.
tm hasChildrenBlock: [ :item | item isDictionnary ].
tm childrenBlock: [ :item | item keysAndValues ].

I wrote that from my phone but I think it is working. Else it shows you the idea :)

Julien

Khrystyna Mykhailiuk <[hidden email]> a écrit :

>Hi, all!
>
>I have OrderedCollection of Dictionaries and I want to display content of
>each Dictionary using TreeModel.
>I wrote these code, but it doesn't work correctly. And I get some errors.
>
>mt := TreeModel new.
>mt roots: (collectionFirst select: OrderedCollection new);
>childrenBlock: [ :item | item ].
>mt openWithSpec.
>
>(This is screenshot of my work)
><http://forum.world.st/file/n4876653/ScreenPharoTreeModel.png>
>
>I need to show each pair of Dictionary in new node.
>
>Can you help me, please?
>
>
>
>--
>View this message in context: http://forum.world.st/How-to-display-Dictionary-using-TreeModel-tp4876653.html
>Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Rép: How to display Dictionary using TreeModel

Khrystyna Mykhailiuk
CONTENTS DELETED
The author has deleted this message.