SUTreeTest - Childless nodes

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

SUTreeTest - Childless nodes

Mart-Mari Breedt
Hi,

I was wondering ... When playing with the evolution tree in SUTreeTest,
it is possible to arrange the tree nodes in such a way that all the
nodes are at the same level. When at this stage, it is no longer
possible to move any nodes below another node at a lower (children)
level. The same goes for when all the children of a particular node has
been moved out. Then it is also no longer possible to move any new
children to this node. Is there a way to prevent this from happening? In
other words, is it possible to always have the option to add children to
a node?

I tried the following two methods, but with no success.

I first tried to always let a particular node render a unorderlist below
it. This was achieved by changing SUTreeTest>>renderNode:on: to this.

renderNode: anObject on: html
        | children |
        html text: anObject.
        html unorderedList: [
                self renderChildren: self childrenOf: anObject on: html
        ]


In a second attempt I just rendererd a text string '...' as a
placeholder below any node that didn't have children, and didn't assign
a passenger to this placeholder list item, hoping that this will prevent
the listitem from being moved away from the otherwise childless node.
The idea was to keep that "fixed" list item as a place holder for future
children. This didn't work, cause even with no passenger assigned, I was
still able to move the placeholder, and once again this node was
childless with no future prospects of having children :-(

Any ideas and suggestions will be very welcome.

Thank you,

Mart-Mari

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUTreeTest - Childless nodes

Lukas Renggli
> I was wondering ... When playing with the evolution tree in SUTreeTest,
> it is possible to arrange the tree nodes in such a way that all the
> nodes are at the same level. When at this stage, it is no longer
> possible to move any nodes below another node at a lower (children)
> level. The same goes for when all the children of a particular node has
> been moved out. Then it is also no longer possible to move any new
> children to this node. Is there a way to prevent this from happening? In
> other words, is it possible to always have the option to add children to
> a node?

As far as I know this is a limitation/bug of script.aculo.us. It is
probably the best if you check-out the official bug-list on
http://script.aculo.us/ and report the problem if it wasn't mentioned
before.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUTreeTest - Childless nodes

Lukas Renggli
In reply to this post by Mart-Mari Breedt
> In a second attempt I just rendererd a text string '...' as a
> placeholder below any node that didn't have children, and didn't assign
> a passenger to this placeholder list item, hoping that this will prevent
> the listitem from being moved away from the otherwise childless node.
> The idea was to keep that "fixed" list item as a place holder for future
> children. This didn't work, cause even with no passenger assigned, I was
> still able to move the placeholder, and once again this node was
> childless with no future prospects of having children :-(

Sortables and their extension to Trees are nice, as long as you don't
need something special. In my experience it can be extremly difficult
to use them in more complicated settings than the examples provided in
Seaside and the script.aculo.us test distribution.

> Any ideas and suggestions will be very welcome.

It is certinly simpler to write your own JavaScript handlers using
bare Draggable and Droppable prototypes than trying to customize
Sortables.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside