rem: if (treeContent._listenersInstalled) 
add: if ("_listenersInstalled" in treeContent && treeContent._listenersInstalled) 
context: function syncTreeView (treeContent, treeView, cb){    function ondblclick(event) { treeView.onRouteDblClick(event); };    function onkeypress(event) { treeView.onRouteKeyPress(event); };    function onfocus(event)    { treeView.onRouteFocus(event); };    function onblur(event)     { treeView.onRouteBlur(event); };        function tryAgain()    {        if ("treeBoxObject" in treeContent)        {            syncTreeView(treeContent, treeView, cb);        }        else        {            //dd ("trying to sync " + treeContent.getAttribute("id"));            setTimeout (tryAgain, 500);        }    };    try    {        if (!("treeBoxObject" in treeContent))            throw "tantrum";                treeContent.treeBoxObject.view = treeView;        if (treeContent.treeBoxObject.selection)        {            treeContent.treeBoxObject.selection.tree =                treeContent.treeBoxObject;        }    }    catch (ex)    {        setTimeout (tryAgain, 500);        return;    }    if (!treeView)    {        if (treeContent._listenersInstalled)        {            treeContent._listenersInstalled = false;                    treeContent.removeEventListener("dblclick", ondblclick, false);            treeContent.removeEventListener("keypress", onkeypress, false);            treeContent.removeEventListener("focus", onfocus, false);            treeContent.removeEventListener("blur", onblur, false);        }    }    else if (!treeContent._listenersInstalled)    {        try        {            treeContent.addEventListener("dblclick", ondblclick, false);            treeContent.addEventListener("keypress", onkeypress, false);            treeContent.addEventListener("focus", onfocus, false);            treeContent.addEventListener("blur", onblur, false);        }        catch (ex)        {            dd ("caught exception setting listeners: " + ex);        }        treeContent._listenersInstalled = true;    }        if (typeof cb == "function")        cb();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/6d3605984754042ac2ea071be474d6b8ed01f0eb/venkman-views.js/buggy/extensions/venkman/resources/content/venkman-views.js