This problem seems obvious, but I didn't get any hits when I searched so...

I have an MXML application, A.mxml;
and an MXML component C.mxml.

There seems to be an initialization problem when I attempt to create 
that MXML component C from within a <mx:script> tag in application A. It 
seems that the label in component C, test1, isn't initialized at that 
point.

I know this is hard to follow, but if anyone else thinks they know what 
I am talking about please let me know.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*" 
xmlns:local="package1.*" creationComplete="someFunc();">
        
        <mx:Script>
                <![CDATA[
                        import flash.util.trace;

                        public function someFunc() {
                                var b:Bob = new Bob();
                                //trace(b.test1.text);
                        }

                ]]>
        </mx:Script>
</mx:Application>


<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*">
        <mx:Label id="test1" text="TEST STRING" />
</mx:Canvas>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to