This content has been marked as final. Show 4 replies
If I were you, I would pass a reference to ViewStack to the components which it holds and then just call the required methods/properties on this reference.
or you could call the viewstack through the hierarchy of your app...
this.parentApplication.myComp.myViewStack.selectedIndex = newIndex;
Also, you could try using a ModelLocator like the one implemented in the Cairngorm framework. then you can just refrence your viewstack from anywhere.
If you haven't tried an MVC system it's something worth looking at if your app will be of any size.
3 solutions, all should work though if you just want somethign quick and dirty I'd reccommend passing the refrence as mentioned in the first reply
First solution I already use in my app but as BrendSmith says it's a bit dirty.
I don't want to use another library such as Caringorm so I think second option - navigating thru hierarchy tree - should do the job.
Thanks for reply :)