dhtmlxTree dynamic Destruction exception

Dear,



I use dhtmlXTree v1.3 in IE7. Because I need to reload new XMLs into the same tree, I destruct dhtmlxTree dynamically and encountered a strange exception: �self.parentObject.lastChild is null or is not an object� in dhtmlxTree_kn.js when I click anywhere in the Div to create the destructed tree after the dhtmlxtree is destructed.



My example code is as follow:











Then click anywhere in the FacetTreeDiv, an exception occurs:self.parentObject.lastChild is null or is not an object in dhtmlxTree_kn.js



Give me some help please!



Thanks!


Hello,


What approach do you use to reload the tree ?


The correct one is to delete all child items and then add necessary items:


tfacetTree.deleteChildItems(2147483647);


facetTree.loadXMLString(’<?xml version="1.0" encoding="utf-8" ?>…’);