> parentDocument should point to the parent MXML "document" (i.e. the
> root element in the .mxml file). So the way it works is correct.
>

here's an interesting one.

if i add another child to myComponent (a mx:Button), it thinks the
parentDocument is the root application and not comp1 (see below).

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">
   <mx:Box id="box1">
        <myComponent id="comp1"/>
   </mx:Box>
</mx:Application>


myComponent.mxml
----------------
<mx:HBox>
   <myButton/>
   <mx:Button initialize="trace(this.parentDocument)"/>
</mx:HBox>

myButton.mxml
-------------
<mx:Button initialize="trace(this.parentDocument)"/>








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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to