[flexcoders] Viewstack page activation

2009-05-06 Thread Jim Haungs
Is there an event raised when a hidden page of a ViewStack becomes visible?  

I'd like to refresh certain widgets on each page every time the page appears, 
but the activate event only fires when the whole application gets the focus 
back from the operating system, and that event doesn't fire when switching 
pages in the viewstack. I haven't found any other events that might pertain to 
this situation.

FWIW, each child of the viewstack is a separate component, and I use an 
Accordion full of labeled HBox'es to switch the viewstack pages via:

click=viewstack.selectedIndex=accordion.selectedIndex

I could manually call something on the click event, but I was hoping for 
something more event-driven/implicit.

Jim




RE: [flexcoders] Viewstack page activation

2009-05-06 Thread Tracy Spratt
The first level child will dispatch the show and hide events when you
expect.  If you want the action to happen the first time the view is shown,
you need to also invoke it in creationComplete.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jim Haungs
Sent: Wednesday, May 06, 2009 12:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Viewstack page activation

 






Is there an event raised when a hidden page of a ViewStack becomes visible? 

I'd like to refresh certain widgets on each page every time the page
appears, but the activate event only fires when the whole application gets
the focus back from the operating system, and that event doesn't fire when
switching pages in the viewstack. I haven't found any other events that
might pertain to this situation.

FWIW, each child of the viewstack is a separate component, and I use an
Accordion full of labeled HBox'es to switch the viewstack pages via:

click=viewstack.selectedIndex=accordion.selectedIndex

I could manually call something on the click event, but I was hoping for
something more event-driven/implicit.

Jim