[flexcoders] Is there a best-practice for knowing when a component is being shown to the user

2009-01-30 Thread João
Hello,

imagine an application composed of a nested hierarchy of Components,
ViewStacks, View States, Navigators, etc.
How can a component on the bottom of the hierarchy run a function
every time he is shown to the user? 

The show event is only dispatched when the component visibility
changes to true. If we are changing the component's parent visibility,
the component might not be visible on screen, but the event is never
dispatched. So, this means that a component never knows if it is being
shown to the user or not (really visible!).

This is a huge problem, since until now I wasn't able to find a clean
an unobtrusive solution. 

Is there a best-practice for solving this problem? 

Thanks,

João Saleiro





Re: [flexcoders] Is there a best-practice for knowing when a component is being shown to the user

2009-01-30 Thread Marco Catunda
Hi João

Just looking it over, try to bindable visible property from parent's
container. It could be a feasible work around.

Cheers
--
Marco Catunda


On Fri, Jan 30, 2009 at 3:03 PM, João joao.sale...@webfuel.pt wrote:
 Hello,

 imagine an application composed of a nested hierarchy of Components,
 ViewStacks, View States, Navigators, etc.
 How can a component on the bottom of the hierarchy run a function
 every time he is shown to the user?

 The show event is only dispatched when the component visibility
 changes to true. If we are changing the component's parent visibility,
 the component might not be visible on screen, but the event is never
 dispatched. So, this means that a component never knows if it is being
 shown to the user or not (really visible!).

 This is a huge problem, since until now I wasn't able to find a clean
 an unobtrusive solution.

 Is there a best-practice for solving this problem?

 Thanks,

 João Saleiro