glamour tree children by level

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

glamour tree children by level

Tudor Girba
Hi,

I added the possibility to specify the children of a tree also based  
on the level at which the item resides.

An example can be found here:
GLMBasicExamples>>treeWithChildrenByLevel

Stef, this solves a problem of easily showing both categories and  
selectors (both being represented by symbols) in the same tree :).

Cheers,
Doru


--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: glamour tree children by level

Stéphane Ducasse
this is really cool.

Stef

On Apr 18, 2010, at 11:46 PM, Tudor Girba wrote:

> Hi,
>
> I added the possibility to specify the children of a tree also based on the level at which the item resides.
>
> An example can be found here:
> GLMBasicExamples>>treeWithChildrenByLevel
>
> Stef, this solves a problem of easily showing both categories and selectors (both being represented by symbols) in the same tree :).
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "There are no old things, there are only old ways of looking at them."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: glamour tree children by level

Lukas Renggli
Very cool indeed, I can use that.

What do I do if I have different kinds of objects per level?

Lukas

On 19 April 2010 10:49, Stéphane Ducasse <[hidden email]> wrote:

> this is really cool.
>
> Stef
>
> On Apr 18, 2010, at 11:46 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> I added the possibility to specify the children of a tree also based on the level at which the item resides.
>>
>> An example can be found here:
>> GLMBasicExamples>>treeWithChildrenByLevel
>>
>> Stef, this solves a problem of easily showing both categories and selectors (both being represented by symbols) in the same tree :).
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "There are no old things, there are only old ways of looking at them."
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: glamour tree children by level

Tudor Girba
Hi Lukas,

On 19 Apr 2010, at 10:52, Lukas Renggli wrote:

> Very cool indeed, I can use that.
>
> What do I do if I have different kinds of objects per level?

You have to take care of that somehow in the children block. The level  
option is one possibility to distinguish between objects. Another one  
is a "isKindOf:", but that you can do yourself. It would be  
interesting to offer other means of mapping (maybe something that  
builds a map behind the scene), but I would not know how to do that.  
If you have ideas, I would be happy to hear them :).

Cheers,
Doru


> Lukas
>
> On 19 April 2010 10:49, Stéphane Ducasse <[hidden email]>  
> wrote:
>> this is really cool.
>>
>> Stef
>>
>> On Apr 18, 2010, at 11:46 PM, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I added the possibility to specify the children of a tree also  
>>> based on the level at which the item resides.
>>>
>>> An example can be found here:
>>> GLMBasicExamples>>treeWithChildrenByLevel
>>>
>>> Stef, this solves a problem of easily showing both categories and  
>>> selectors (both being represented by symbols) in the same tree :).
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "There are no old things, there are only old ways of looking at  
>>> them."
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"To lead is not to demand things, it is to make them happen."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: glamour tree children by level

Lukas Renggli
>> Very cool indeed, I can use that.
>>
>> What do I do if I have different kinds of objects per level?
>
> You have to take care of that somehow in the children block. The level
> option is one possibility to distinguish between objects. Another one is a
> "isKindOf:", but that you can do yourself.

Aha, ok. I was quickly looking at the code but couldn't figure out how
the specification of the different selectors at different levels
worked :-)

> It would be interesting to offer
> other means of mapping (maybe something that builds a map behind the scene),
> but I would not know how to do that. If you have ideas, I would be happy to
> hear them :).

I was thinking/expecting more something along a meta-model for trees.

For now I guess the current implementation is fine, I just need to
implement some unique selector in all the objects that will be part of
the tree that returns their children.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: glamour tree children by level

Tudor Girba
Hi,

On 20 Apr 2010, at 09:08, Lukas Renggli wrote:

>>> Very cool indeed, I can use that.
>>>
>>> What do I do if I have different kinds of objects per level?
>>
>> You have to take care of that somehow in the children block. The  
>> level
>> option is one possibility to distinguish between objects. Another  
>> one is a
>> "isKindOf:", but that you can do yourself.
>
> Aha, ok. I was quickly looking at the code but couldn't figure out how
> the specification of the different selectors at different levels
> worked :-)
>
>> It would be interesting to offer
>> other means of mapping (maybe something that builds a map behind  
>> the scene),
>> but I would not know how to do that. If you have ideas, I would be  
>> happy to
>> hear them :).
>
> I was thinking/expecting more something along a meta-model for trees.
>
> For now I guess the current implementation is fine, I just need to
> implement some unique selector in all the objects that will be part of
> the tree that returns their children.

Yes, when you have distinct types you can just either dispatch to  
them, or use an isKindOf: as a shortcut. The problem comes when you do  
not have distinct types (for various strange reasons) but you still  
want to treat the objects differently.

What do you mean by a meta-model for trees? This is what the children:  
block does. What else would you like?

Cheers,
Doru

> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev