[Seaside] SUTreeTest - Childless nodes
breedt_m at aircom.co.za
Thu Jul 27 09:15:10 UTC 2006
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
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.
More information about the Seaside