You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/11/17 15:43:51 UTC

[GitHub] [royale-asjs] carlosrovira commented on issue #939: Access to parent functions

carlosrovira commented on issue #939:
URL: https://github.com/apache/royale-asjs/issues/939#issuecomment-729015039


   Hi
   
   I never used that approach since it couples files and is bad design. I recommend you to comunicate via composition and events.
   
   Anyway, I looked for your problems and I think you need the following bead:
   
   ```/**
        *  The ParentDocumentBead class looks up the parent
        *  chain to find a parent that was written in MXML.
        *  Because it is usually rare for an application
        *  to need to know this information, an optional bead
        *  is used to compute it, instead of baking in the
        *  overhead of a recursive infrastucture to store
        *  this information.  It is intended to be used
        *  as a bead in the top-level tag of an MXML document.
        *  
        *  @royaleignoreimport org.apache.royale.core.IChild
        * 
        *  @langversion 3.0
        *  @playerversion Flash 10.2
        *  @playerversion AIR 2.6
        *  @productversion Royale 0.0
        */
   	public class ParentDocumentBead extends DispatcherBead
   ```
   
   Also we have `parent` in each component but I think you want the previous bead to refer to the parent MXML file.
   
   HTH


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org