Flex Pass Message to Parent Component

So I’m passing the time by getting ahead on some stuff for work (possibly dangerous at this point, I know). I have a method in a .mxml that needs to reference its parent component. The way this was accomplished before was by getting a static reference to the main app, then just doing this:

app.component.whateverINeedToDo();

Problem is, now that I’m pulling the parent component out into a module, I can’t necessarily rely on a reference to the main app; I need to transfer information some other way. I could use the EventDispatcher system built into Flex. I’ve already extended this mildly to facilitate interaction between my modules, but it seems like overkill for a simple intra-module method call. Need to think on this.

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Anonymous
    Posted July 29, 2007 at 11:33 pm | Permalink

    Man, I just slept for 8 hours and this is enough to put me down for another.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>