That sounds will a pretty good way to go about it. Got for it.
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
stephen50232
Sent: Wednesday, November 21, 2007 12:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Managing States and Cairngorm



Hi,

I'm building a new app using Cairgorm and one of the problems I'm
having is managing states. 
My application is set up with a base state which is blank and then two
other states, one which contains my login screen (called Login) and
one which contains the main menu (called MainApp). Then all my other
states are based on the state called MainApp so that they all contain
the main menu. 

Now when my application starts it should go to the Login state, then
after logging in the system will load the Welcome state, which is
based on the MainApp state. So to change between states in my
Application tag I have set currentState like this:

currentState="{model.workflowState}"

When my application first starts it should load the Login state as
default, I set the model.workflowState variable as:

public var workflowState:String = "Login";

Will I be able to update the model.workflowState? The way I am
thinking of doing this is by having an event on all the menu buttons
which changes model.workflowState to the value of the state, for
example if the user clicks on the Welcome button, model.workflowState
is set as "Welcome".

Now is this a good way to manage states in a Cairngorm application,
I'm trying to achieve 2 things, one only have one main menu which is
used in all states, and two use binding to select the current state.

Is there another way I could do this?

Thanks

Stephen



 

-- 
WARNING
-------
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--------------
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.

Reply via email to