Mikael
You wrote in message news:9b6bt6$7s8pd$
[hidden email]...
> I have discovered what I think is a somewhat illogical behaviour of
> TreeModel (or actually TreeModelAbstract). I am not sure if it is a bug,
but
> it isn't quite what I had expected. Try this:
>
> t := TreeModel new.
> t add: 1 asChildOf: nil;
> add: 2 asChildOf: 1;
> add: 3 asChildOf: 2;
> add: 4 asChildOf: 3.
>
> "Display this:"
> t withAllParents: 4
>
> This answers an OrderedCollection(4 1 2 3), when I had expected an
> OrderedCollection(1 2 3 4).
I don't think #withAllParents: is necessarily supposed to be making any
promises about the order in which the nodes are returned, but as it is
answering an OrderedCollection (and says so in the comment) I think it would
be most sensible if it answered the reverse path to the root, so I will make
an entry in the bugs system to have it altered to do that.
Regards
Blair