This works, and tree.selectedItem is not null after assignment:

var nodeToSelect:XML = this.tree.dataProvider.getItemAt(0) as XML;

this.tree.expandItem(nodeToSelect, true);
this.tree.selectedItem = nodeToSelect; // NOT NULL
                                
But this doesn't, when the tree 'selectedItem' is set to an xml sub node: 

var node:XML = this.tree.dataProvider.getItemAt(0) as XML;
var nodeToSelect:XML = node.children()[0]; // valid value
                                
        this.tree.expandItem(n2, true);
        this.tree.selectedItem = nodeToSelect; // NULL

How can I fix this?

Cheers.


Reply via email to