Topic: Forest and Adding nodes
Hi,
If the tree.forest value is true, we can't add any node to the tree. Because tree.root is undefined. Only we can add with tree.load function. But every time loading is not useful.
Edited:
Also I added a few lines to mif.tree.js after 71. line:
$getIndex: function(){//return array of visible nodes.
this.$index=[];
var node=this.forest ? this.root.getFirst() : this.root;
//-----Fixed-------
if (node == null)
return [];
//-------end of fix ---------
do{
this.$index.push(node);
}while(node=node.getNextVisible());
},
Because if the tree is a forest, when you delete all nodes in the tree, you will get an error. So, I added this a few lines.
Regards.
Last edited by ziddiri (2009-03-30 18:10:44)