[Project_owners] Deleting a tree row

maple guy maple.nu at gmail.com
Thu Mar 24 23:10:32 EST 2005


Hi

What is the right way of deleting a row in a XUL tree? The code I'm
using just deletes the text in the columns. And an empty row is still
visible in the tree. I'm using a tree with the following set:

flags="dont-build-content"  
datasources="rdf:null"

The way I delete the rows is:
function deleteRow(datasource, tree, node)
{
    var props = datasource.ArcLabelsOut(node);
    var prop;
    
    while(props.hasMoreElements())
    {
        prop = props.getNext();
        var target = datasource.GetTarget(node, prop, true);
        datasource.Unassert(node, prop, target);
    }
    props = datasource.ArcLabelsIn(node);
    
    while(props.hasMoreElements())
    {
        prop = props.getNext();
    }
}

BR
Sven


More information about the Project_owners mailing list