A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [Flex] tracing XML/MXML

  1. #1
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429

    [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>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?

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    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.

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    makes sense, thanks man.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center