[Betternestedset-talk] child node promoting to root node

Mark Noten mark.noten at itfc.be
Fri Mar 23 16:41:27 EDT 2007


I don't understand something. Consider the following example:

1) parent = Node.create
2) child = Node.create
    child.move_to_child_of(parent)

So the tree looks now like:

parent (level=0) => this is the only root node
    |
child (level=1)

What instance method do I have to call on the child node to go to the 
following structure:

parent (level=0)  child (level=0) => now there are two root nodes

So both nodes have become root nodes now. It may look like a strange 
situation that a child node would become a root node while it's old 
ancestors don't move inside the tree. I think it's a bit like The 
Godfather where one of the caporegimes could start their own family if 
they served well. It didn't happen in the movie though... ;-)

Kind regards,

Mark


More information about the Betternestedset-talk mailing list