You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2017/02/16 21:57:34 UTC

ViewStack

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

Re: ViewStack

Posted by Nemi <ne...@gmail.com>.
If it is not problem to create all children at start, then use
creationPolicy="all"



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/ViewStack-tp14695p14727.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: ViewStack

Posted by mark goldin <ma...@gmail.com>.
Yes, took this route. Works. Thanks.

On Fri, Feb 17, 2017 at 8:14 AM OK <po...@olafkrueger.net> 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.
>

Re: ViewStack

Posted by OK <po...@olafkrueger.net>.
>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.

Re: ViewStack

Posted by mark goldin <ma...@gmail.com>.
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 <po...@olafkrueger.net> 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.
>

Re: ViewStack

Posted by OK <po...@olafkrueger.net>.
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.