Hi Paul,

I agree, creating a dependancy by referencing the application isn't 
truly modular.  But sometimes it's OK to use a quick and dirty 
approach.  Probably the best solution is to bind state to a model.  
However, events work just fine as well.

Just answering the original question: "How do i back out of the 
component and target the states on the main application page?" :p

-TH

--- In [email protected], "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> Hi Tim,
> 
> While that may work, should components even be aware of the states 
used in 
> other parts of the application?
> 
> I'd suggest that to get truly modular components the component 
should be 
> raising an event for the application to respond to and change it's 
own 
> state, rather than have a component do this directly.
> 
> Paul
> 
> ----- Original Message ----- 
> From: "Tim Hoff" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, September 20, 2006 11:14 PM
> Subject: [flexcoders] Re: another state and targeting issue
> 
> 
> > Hi there,
> >
> > Your custom component is a child.  You can reference the main
> > application (or parent) by using parentDocument.currentState or
> > Application.application.currentState; depending on the scope.
> > parentDocument doesn't require an import.  But 
Application.application
> > requires: import mx.core.Application;.
> >
> > -TH
> >
> > --- In [email protected], "bghoward3" <billhoward@> 
wrote:
> >>
> >> i have a tree nav stored as a custom component, i drp it on my 
base
> >> state and use it throught application. when i invoke method to
> > change
> >> state it fails stating it cannot find it, if i paste the code 
for
> > the
> >> tree directly in my main application it works fine, but not as
> > custom
> >> componet, how do i back out of the component and target the 
states
> > on
> >> the main application page?
> >>
> >
> >
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>






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