Adobe Flex Actionscript Question:
Download Job Interview Questions and Answers PDF
myTree appears just fine but why ca not I access the node attributes?
![Adobe Flex Actionscript Interview Answer Adobe Flex Actionscript Interview Question](https://globalguideline.com/public/images/interview/18.png)
Answer:
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");
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");
Download Adobe Flex Actionscript Interview Questions And Answers
PDF
Previous Question | Next Question |
When I add or modify an item in my dataProvider, why does not it show up in my DataGrid? | How do I pass parameters to a pop-up window in actionscript? |