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