Thanks allot: I did it by stuffing all the folders in a array and looping over that - but this way it doesn't need these extra vars. But this puzzles me: With
function expand(tree) {
    tree.getItems().forEach( function(o) { o.open(); } );
}
and then
expand(tree);
the whole tree gets expanded. But with

function collapse(tree) {
    tree.getItems().forEach( function(o) { o.close(); } );
}

and then
collapse(tree);
Only the root gets collapsed. If you expand the root again the children are still expanded - why? Didn't i just collapse them? And if i do tree.open() - it expands the root, but tree.close() does nothing!

confused,
- Peter

On 2/22/06, Benjamin Reitzammer <[EMAIL PROTECTED]> wrote:
Hi,

Am 22.02.2006 13:55, Sebastian Werner schrieb:
> Peter Sheldrick schrieb:
>
>> What would the loop look like? Visit every node and call the event:
>> "changeSelection"? Can you make an example?
>
>
> This has nothing to do with the selection. You must just call open() on
> each tree folder. I think the best is to implement this in QxTreeFolder,
> and let each tree folder iterate over the children and call on each
> child which is instanceof QxTreeFolder itself the same function. Should
> not be that complex.

In fact it's quite easy with the QxTree.getItems() property ...
something along the lines of

yourTreeVar.getItems ().forEach( function(o) { o.open(); } );

Cheers

Benjamin


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to