-
[Flex] tracing XML/MXML
Man I have to get used to that logfile thing. Kinda sucks having to reopen it everytime you want to see what you traced.
Anyway, how to I trace stuff that is in an <mx:> tag?
For instance, I have this script tag:
Code:
<mx:Script>
<![CDATA[
trace(employees);//how do I trace employees?
]]>
</mx:Script>
followed by this:
Code:
<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>[email protected]</email>
<active>true</active>
</employee>
</mx:XMLList>
What am I doing wrong?
-
You need to wait for employees to be created.
Something like:
Code:
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="trace (employees)">
Or create a creation complete function for your app.
-