rem: node.addChild(child); 
add: try { node.addChild(child); } catch (e) { return; } 
context: function updateTree(ajaxRequest){    /*    var xml = fetchXML(url);    if (! xml)    {        alert("could not fetch XML - server not reachable?");        return;    }    */        var xml = ajaxRequest.responseXML;    if (!errorCheck(xml)) return;        var containers = xmlGetElement(xml, "containers");    if (! containers)    {        alert("no containers tag found");        return;    }    var type = xmlGetAttribute(containers, "type");    var parentId = type+xmlGetAttribute(containers, "ofId");        var node = getTreeNode(parentId);    var success = containers.getAttribute("success");    if (! success || success != "1")    {        var parNode = node.getParent();        parNode.childrenHaveBeenFetched=false;        parNode.resetChildren();        fetchChildren(parNode, true, true);        //selectNode(parNode.getID());        //alert("no success!");        return;    }        var selectItStr = containers.getAttribute("select_it");    var selectIt = (selectItStr && selectItStr == '1');        if (node.childrenHaveBeenFetched)    {        return;    }    var cts = containers.getElementsByTagName("container");    if (! cts)    {        alert("no containers found");        return;    }        var i;    var len = cts.length;    var doSelectLastNode = false;        for (var i = 0; i < len; i++)    {        var c = cts[i];        var id = type + xmlGetAttribute(c, "id");                //TODO: childCount unnecessary? - hasChildren instead?        var childCount = xmlGetAttribute(c, "childCount");        if (childCount)            childCount = parseInt(childCount);        var expandable = childCount ? true : false;                var autoscan = xmlGetAttribute(c, "autoscan");                var thisIconArray = iconArray;        if (autoscan == '1')            thisIconArray = autoscanIconArray;        if (autoscan == '2')            thisIconArray = autoscanConfigIconArray;                var title = xmlGetText(c);        var child = new TreeNode(id, title, thisIconArray);                //TODO:        //child.setEditable(true);                child.setHasChildren(expandable);        node.addChild(child);        child.addOpenEventListener("openEventListener");                if (id == lastNodeDbWish)        {            lastNodeDbWish=null;            lastNodeDb = id;            doSelectLastNode = true;        }        else if (id == lastNodeFsWish)        {            lastNodeFsWish=null;            lastNodeFs = id;            doSelectLastNode = true;        }                //recurse immediately:        //fetchChildren(openEventListener, child);    }    node.childrenHaveBeenFetched = true;    refreshOrQueueNode(node);    if (doSelectLastNode)        selectLastNode();    else if (selectIt)    {        //alert("selecting: " + parentId);        selectNodeIfVisible(parentId);        //selectNode("d0");        //alert("selected! " + parentId);    }}
meta: 7608	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7608/9b4a3a8fce7025c43eeeb7b51337dc1e9b77a162/tree.js/clean/web/js/tree.js