On 7/31/07, mshillin <[EMAIL PROTECTED]> wrote:
>
> I cannot figure out how to remove all nodes in the tree. (7.1)
>
> Calling tree.getDataModel().prune(0, true) throws an exception
>
>
> this._nodeArr[node.parentNodeId] has no properties - in
> SimpleTreeDataMod... (line 537)
You're doing it correctly, but there's a bug associated with removing
all nodes. Since you already have a program to test it and I don't
have the time right now to write one, would you please verify that the
following patch fixes the problem. If so, I'll check it in.
Thanks,
Derrell
Index: SimpleTreeDataModel.js
===================================================================
--- SimpleTreeDataModel.js (revision 9196)
+++ SimpleTreeDataModel.js (working copy)
@@ -529,7 +529,8 @@
this.prune(this._nodeArr[nodeId].children[i], true);
}
- if (bSelfAlso)
+ // Now remove ourself, if requested. (Don't try to remove the root node).
+ if (bSelfAlso && nodeId != 0)
{
// Delete ourself from our parent's children list
var node = this._nodeArr[nodeId];
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel