I do agree with Andrew on the view helpers states in a ModelLocator and using bindings. Just remember you can have many ModelLocators in an application, so one may be dedicated at holding application-states, and another one may be the classic one, which holds your data.
Cheers, r0main --- In [email protected], "Andrew Spaulding" <[EMAIL PROTECTED]> wrote: > Hi Kent, > > If you are using Cairngorm 0.99 there is no need to set the view like > this: > > <view:IndexViewHelper name="indexView" view="{this}" /> > > The above syntax is no longer necessary, and has been replaced by a > much simpler use of the id attribute, making it simpler to call a > function on the viewHelper within that view. > > <view:IndexViewHelper id="indexView" /> > > Regarding the "view" data member, it is a part of the ViewHelper which > extends MXMLObject. It has an initialized method which is called by > the Flex component framework after a component has been initialized. > This method takes 2 parameters, first being the parent document (the > view object) and the second is the id of the view helper. In here the > "view" attribute is set. > > To provide an idea of how I manage multiple screen views is that I > have multiple workFlowState attributes in the ModelLocator, which my > view stacks are bound to. For instance I have an > applicationWorkflowState which switches views between the login screen > and the main application (being another view stack). And then for each > sub application (or section) I maintain a separate workflow state. > > Hope this makes sense. But I'd be interested to hear how others > approach this issue. > > Best, > > Andrew Spaulding > www.flexdaddy.com > > > > > > --- In [email protected], Seth Voltz <[EMAIL PROTECTED]> wrote: > > Kent, > > > > The "view" member variable is passed in from the calling MXML file as a > > parameter of the tag. In the case of IndexViewHelper you might call > it as > > > > <as:IndexViewHelper name="indexView" view="{ this }" /> > > > > assuming your name space for that tag is 'as'. > > > > > > <Seth /> > > > > > > Kent Henneuse wrote: > > > > >I am using Flex for new development and starting to get a grasp on > Cairngorm > > >as well. I am now trying to get a workflow between static screens > laid out > > >so that I can slowly wire up the server-side calls. > > > > > >What I would like to find out is what is the best way to set up the > flow? > > >Currently I have a View Stack that has each of the main screens. > This seems > > >ok if I don't have a lot of screens but I can see that if I have > more then > > >say ten items in the View Stack it will rapidly become hard to > manage. I > > >was thinking of having layers of View Stacks (View Stack inside of > another > > >View Stack) but haven't figured out how to do this in Cairngorm > yet. I am > > >hoping to avoid having a class that manages the screens shown as if > it were > > > > > >What are the approaches that others have used to solve this sort of > flow > > >problem? Maybe it is simply just needing a better description of > how the > > >flow of the components are done in Cairngorm for the switching of > the views. > > > > > >BTW where does the data member 'view' come from in > IndexViewHelper.as and > > >some of the other View Helper as I don't see it being a member of the > > >ViewHelper base class? > > > > > > Thanks, > > > > > > -Kent > > > > > >"Perfection is achieved, not when there is nothing more to add, but > when > > >there is nothing left to take away." > > > - Antoine de Saint Exupery > > > > > > > > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

