Categories | Question details Back To List | ||||||||
Tree - v2.1 - Destructor RE: http://www.dhtmlx.com/docs/products/kb/index.php?s=normal&q=8250 It looks like the fix from v1.6 for the destructor function didn't make it to v2.1. v1.6 build 80512: dhtmlXTreeObject.prototype.destructor=function(){for (var a in this._idpull){var z=this._idpull[a];if (!z)continue;z.parentObject=null;z.treeNod=null;z.childNodes=null;z.span=null; --> if(z.tr) <-- z.tr.nodem=null;z.tr=null; --> if(z.htmlNode) <-- z.htmlNode.objBelong=null;z.htmlNode=null;... v2.1 build 90226: dhtmlXTreeObject.prototype.destructor=function(){for (var a in this._idpull){var z=this._idpull[a];if (!z)continue;z.parentObject=null;z.treeNod=null;z.childNodes=null;z.span=null;z.tr.nodem=null;z.tr=null;z.htmlNode.objBelong=null;z.htmlNode=null;... Thanks, - Dave Answer posted by Alex (support) on May 15, 2009 00:43 Hello, Could you please explain what problem you have faced with destructor() method in the latest tree version. Answer posted by David Hutchings on May 15, 2009 10:15 When tree.destructor() is called with the v2.1 build 90226 code, a JS error is generated. The error is along the lines of "tr is not an object." This is because the code attempts to destroy z.tr.nodem without first ensuring that z.tr actually exists (it may not always.) The same type of error occurs for "z.htmlNode.objBelong" as well (z.htmlNode doesn't always exist.) Thanks, - Dave Answer posted by Alex (support) on May 18, 2009 01:27 Locally, the issue isn't confirmed. Please, see attached sample Could you please provide the sample to re-create the described issue. Attachments (1)
Answer posted by David Hutchings on May 18, 2009 16:37 That version of dhtmlxtree.js works. The v2.1 build 90226 file that we were sent via email is very different than the one provided in the sample. Answer posted by Alex (support) on May 18, 2009 23:28 Hello, this sample contains libraries from standard edition. Please, contact us at support@dhtmlx.com, provide your ref.number and we'll send you PRO version of this sample |