Hi Matt,

 Hmm - that might work, if I use the .parent field to find the components
parent I could avoid hard coding parent names,etc...
But it feels like it violates encapsulation - the component really shouldn't
need to 'poke' its parent just
to find out when its being used/viewed.

I'll also experiment more with show/hide - maybe I missed something in the
docs...

Thanks!
Steve

On 11/16/06, Matt Chotin <[EMAIL PROTECTED]> wrote:

   Could you use the CHANGE event from the view stack instead?  Though I
would have expected the SHOW event to fire on the component anyway.


 ------------------------------

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Steve Hindle
*Sent:* Thursday, November 16, 2006 1:01 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Event fired _every_ time a component is made
visible/active



Hi All,

There was a discussion recently about how to detect when a component
becomes visible/active. It basically proposed 3 methods:
creationComplete(), show()/hide(), and UpdateDisplayList(). However,
these all seem to have problems:
creationComplete() - only fires when the component is created
show()/Hide() - not applicable if your using selectedChild
to switch views
UpdateDisplayList - Eek - gotta go to 'internals' to accomplish this
?? scary...
Really seems like overkill for this
particular usage.

Are there any other/simpliar methods for determining when a child is
made active/visible?

For example, I'd like to re-initialize a component each time I switch to
it...
First time - no problem, creationComplete is called and my init runs.
However, if I switch to a different component using a menubar (and
selectedChild)
and then come back to the original component, how do I get my init
function called again?

Steve

Reply via email to