Reputation: 1
I'm working on automation of a flex application that uses charts. I need to identify the datatip element of a chart and read its data. So far, I'm having trouble identifying the element on its own. When I use flashfirebug and hover over the chart, the datatip is shown and it is displayed in the inspector, however I can't capture it. Same issue with the tool's spy (Ranorex)
any ideas?
Upvotes: 0
Views: 126
Reputation: 53
Not sure if this question is still current, or if my understanding of it is accurate; but since it came up during my fruitless google searches for what I was trying to do, I thought I'd post my solution!
Assuming that you are trying to get the DataTip object, you need to iterate through the "rawChildren" of this.systemManager.getTopLevelRoot(), eg:
var container:ISystemManager = this.systemManager.getTopLevelRoot() as ISystemManager;
for (var i:int = 0; i < container.rawChildren.numChildren; i++) {
if (thisChild is DataTip) {
//Done!
}
}
(In my case I was trying to copy the contents of the datatip to the clipboard from the container of the chart)
Upvotes: 0