Le mardi 08 mars 2011 à 10:25 +0100, AxiNat a écrit :
> Sorry, I've been playing for a while with ILTree but I don't get how
> should I fill it up... can you please provide a simple example?
The class comment of ILTree includes an example:
ILTree new
item: Object;
childrenBlock: [:class | class subclasses];
contentsBlock: [:e :class | e text: class name]
This example displays the name all subclasses of Object in a tree
HTH,
Nico
>
>
> For example, if I have a collection of associations, something similar
> to:
>
>
> OrderedCollection
> with:
> ('A Category' -> OrderedCollection
> with: ('A Subcategory' -> anObject)
> with: ('Another Subcategory' -> anotherObject))
> with:
> ('Another Category' -> OrderedCollection
> with: ('Yet Another Subcategory' -> yetAnotherObject)
> with: ('Still Another Subcategory' -> stillAnotherObject))
>
>
> How would one build the associated ILTree for it?
>
>
> Thanks!
>
>
> Bernat Romagosa.