Good to hear that helps. 

Honestly I really never liked using the _parent (although I have many
times)... it seems to break the "loose coupling" I am always trying to
achieve with my components. By using the method I outlined above you
can easily reuse the MyCode class for any other MXML file you write
without having to explicitly link it into the application... in other
words your MyCode object only knows it needs a TextInput component as
input. It doesn't need to know anything about the display list config
etc. 

By using _parent, _root, etc you are constraining the flexibility of
your components.

Anyone else have any other methods that are of interest? 

Nick 
nickgs.com 

--- In [email protected], "mts_link" <[EMAIL PROTECTED]> wrote:
>
> That actually helps a lot, thanks! What other methods can I use, or
must  pass all components to the class in order to use them?
> 
> Is there a way I can pass a reference to the application scope so I
can reference all the components in that app? In flash, I would just
use _parent.variable, but I haven't found a way to do this yet in flex
and I am sure there is a way. :)
> 
> Again, thanks for the example code as it certainly helps shed some
light on the scope model.
> 
> John
>





--
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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