"Hugh Gibson" <[EMAIL PROTECTED]> writes:

>> Another property of a node is a children array, which is the list of
>> node ids which are children of this node. 
>
> What about next/previous sibling and first/last child? Methods for those
> would be very useful.

First/last child is easy and fast.  Iterating children is fast.  Finding the
next/previous sibling given only a node requires searching the parent's
children list for the node id of the given node, and then returning the node
id that's immediately preceding or following the located child.  For one-time
use, that can be fine.  If it's important to frequently access next/previous
child without iterating, it's probably worthwhile to subclass the
SimpleTreeDataModel and add sibling "pointers".

Derrell

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to