ViewStack

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ViewStack

mark goldin
I have two views in it. By changing selectedIndex I can show one or
another. I am having some problems with this solution because I am using
createComplete event which only fires once per view. Is there another event
that I could use in my view to know when it gets on screen?

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ViewStack

Olaf Krueger
mark goldin wrote
I have two views in it. By changing selectedIndex I can show one or
another. I am having some problems with this solution because I am using
createComplete event which only fires once per view. Is there another event
that I could use in my view to know when it gets on screen?

Thanks
You could listen to the ViewStacks change event and determine the displayed view by the selected index.

HTH,
Olaf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ViewStack

mark goldin
And that's what I am basically doing. But I also need to do something in a
view when gets on screen. CreationComplete is not working because it only
fires once.

On Fri, Feb 17, 2017 at 2:01 AM OK <[hidden email]> wrote:

> mark goldin wrote
> > I have two views in it. By changing selectedIndex I can show one or
> > another. I am having some problems with this solution because I am using
> > createComplete event which only fires once per view. Is there another
> > event
> > that I could use in my view to know when it gets on screen?
> >
> > Thanks
>
> You could listen to the ViewStacks change event and determine the displayed
> view by the selected index.
>
> HTH,
> Olaf
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/ViewStack-tp14695p14696.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ViewStack

Olaf Krueger
>But I also need to do something in a view when gets on screen
Probably there're some other approaches but if you are already able to retrieve the instance of the displayed view you could just call any public method on it do to anything you want.

HTH,
Olaf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ViewStack

mark goldin
Yes, took this route. Works. Thanks.

On Fri, Feb 17, 2017 at 8:14 AM OK <[hidden email]> wrote:

> >But I also need to do something in a view when gets on screen
> Probably there're some other approaches but if you are already able to
> retrieve the instance of the displayed view you could just call any public
> method on it do to anything you want.
>
> HTH,
> Olaf
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/ViewStack-tp14695p14698.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ViewStack

Nemi
In reply to this post by mark goldin
If it is not problem to create all children at start, then use creationPolicy="all"
Loading...