Adobe Flex ActionScript Interview Questions and Answers

 

myTree appears just fine but why ca not I access the node attributes?

Select a node in your myTree. In ActionScript, you can reference this node by using
the following code: myTree.selectedNode;



To access the attributes of the node, use the tree DataProvider API. These methods
will work for any format dataProvider item, which might be an object, array, or
XML node.



The following example might work: myTree.selectedNode.attributes.myAttribute



But the following example is far more reliable:



myTree.selectedNode.getProperty("myAttribute");

Posted by:Richards