rem: this.childData = source; this.rowCount = source.sourceText.length; this.tabString = leftPadString ("", source.tabWidth, " "); 
add: this.childData = sourceText; this.rowCount = sourceText.lines.length; this.tabString = leftPadString ("", sourceText.tabWidth, " "); 
context: function sv_dsource (source){    if ("childData" in this && source == this.childData)        return;        function tryAgain (result)    {        if (result == Components.results.NS_OK)            console.sourceView.displaySource(source);        else        {            dd ("source load failed: '" + source.fileName + "'");        }    }    /* save the current position before we change to another source */    if ("childData" in this)    {        this.childData.pendingScroll = this.outliner.getFirstVisibleRow() + 1;        this.childData.pendingScrollType = -1;    }        if (!source)    {        delete this.childData;        this.rowCount = 0;        this.outliner.rowCountChanged(0, 0);        this.outliner.invalidate();        return;    }        /* if the source for this record isn't loaded yet, load it and call ourselves     * back after */    if (!source.isLoaded)    {        disableReloadCommand();        /* clear the view while we wait for the source */        delete this.childData;        this.rowCount = 0;        this.outliner.rowCountChanged(0, 0);        this.outliner.invalidate();        /* load the source, call the tryAgain function when it's done. */        source.pendingScroll = 0;        source.pendingScrollType = -1;        source.loadSource(tryAgain);        return;    }    enableReloadCommand();    this.childData = source;    this.rowCount = source.sourceText.length;    this.tabString = leftPadString ("", source.tabWidth, " ");    this.outliner.rowCountChanged(0, this.rowCount);    this.outliner.invalidate();    var hdr = document.getElementById("source-line-text");    hdr.setAttribute ("label", source.fileName);    if ("pendingScroll" in this.childData)    {        this.scrollTo (this.childData.pendingScroll,                       this.childData.pendingScrollType);        delete this.childData.pendingScroll;        delete this.childData.pendingScrollType;    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/89326cbcdc6feb4eef3ffc00bb488c9640e8dd81/venkman-trees.js/clean/extensions/venkman/resources/content/venkman-trees.js