;

PDA

Click to See Complete Forum and Search --> : [Flex] tracing XML/MXML


jAQUAN
08-22-2006, 09:00 PM
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:

<mx:Script>
<![CDATA[
trace(employees);//how do I trace employees?
]]>
</mx:Script>


followed by this:

<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>ccoenraets@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>jwall@fictitious.com</email>
<active>true</active>
</employee>
</mx:XMLList>


What am I doing wrong?

gSOLO_01
08-23-2006, 11:03 AM
You need to wait for employees to be created.

Something like:

<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="trace (employees)">

Or create a creation complete function for your app.

jAQUAN
08-23-2006, 02:35 PM
makes sense, thanks man.