TreeList

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

TreeList

Bernat Romagosa
Hi list,

I was wondering whether there is a TreeList-like menu implemented in iliad, (or whether you can use JQuery's one) otherwise I'll implement my own and share it.

Thanks!

Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: TreeList

Nicolas Petton
Le vendredi 04 mars 2011 à 11:25 +0100, AxiNat a écrit :
> Hi list,
>
>
> I was wondering whether there is a TreeList-like menu implemented in
> iliad, (or whether you can use JQuery's one) otherwise I'll implement
> my own and share it.

IIRC there is an ILTree class in Iliad-More-UI.

Cheers,
Nico
>
>
> Thanks!
>
>
> Bernat Romagosa.


Reply | Threaded
Open this post in threaded view
|

Re: TreeList

Bernat Romagosa
Indeed there is, and I don't understand why didn't I see it on Friday... I ended up implementing my own, but I see the built-in one is much better :)

Thanks once again Nico!

2011/3/5 Nicolas Petton <[hidden email]>
Le vendredi 04 mars 2011 à 11:25 +0100, AxiNat a écrit :
> Hi list,
>
>
> I was wondering whether there is a TreeList-like menu implemented in
> iliad, (or whether you can use JQuery's one) otherwise I'll implement
> my own and share it.

IIRC there is an ILTree class in Iliad-More-UI.

Cheers,
Nico
>
>
> Thanks!
>
>
> Bernat Romagosa.



Reply | Threaded
Open this post in threaded view
|

Re: TreeList

Bernat Romagosa
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?

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.
Reply | Threaded
Open this post in threaded view
|

Re: TreeList

Nicolas Petton
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.


Reply | Threaded
Open this post in threaded view
|

Re: TreeList

Bernat Romagosa
Indeed, sorry, I'm not used to check class comments...

Thanks a lot!

Bernat Romagosa.