Using the Conductor as a state machine

Topics: UI Architecture
May 2, 2012 at 7:41 PM

Hi - I'm very new to CM and am thus far impressed with the time it has saved me writing glue code. 

I have been reading about the conductor and how it can be used to manage views ("Screens") in my main window. What I'm looking for is the "CM way" to hook into a view being deactivated so that a new screen can be displayed. I'm imagining some sort of state-machine behavior.

For example- my app should start up with a login screen; so I know to activate that in my main view model. When the login screen successfully authenticates I want to move the user to the next screen, but I don't want my login screen to know anything about my home screen. Similarly my home screen can branch out to other screens.

I'm hoping that I am just missing some component that I need to use in my conductor that allows the conductor to say "ok this screen was just closed/deactivated now which screen should I display next?" This "what display next" will be a call out to my state-machine-like screen manager.