Futurescale, Inc.
PureMVC Home
The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
https://github.com/PureMVC
PureMVC Architects Lounge
Announcements and General Discussion
General Discussion
another statemachine question...
Pages: [
1
]
« previous
next »
Author
Topic: another statemachine question... (Read 4288 times)
marcink
Jr. Member
Posts: 13
another statemachine question...
«
on:
March 02, 2009, 09:01:30 »
is it possible to nest states?
say i have 4 states: state A, state B, state C and state D
when in state B, i'd like to have the possiblity to trigger state C and state D, but only if i'm in state B.
when i would try to trigger state C/D while the current state is A, nothing happens...
is that possible? or do i have to make a switch in the handleNotification function?
thanks
Logged
Neil Manuell
Courseware Beta
Sr. Member
Posts: 109
Re: another statemachine question...
«
Reply #1 on:
March 02, 2009, 03:46:10 »
consider this:
<fsm initial='A'>
<state name='A'>
<transition action='toB' target='B'/>
</state>
<state name='B'>
<transition action='toC' target='C'/>
<transition action='toD' target='D'/>
</state>
<state name='C'>
<transition action='toA' target='A'/>
</state>
<state name='D'>
<transition action='toA' target='A'/>
</state>
</fsm>
if the state is B, you can go to C or D (be calling ACTION 'toC' or 'toD')
however in A calling these ACTIONS would do nothing. You would have to call 'toB' to change state, as the only legal state that you can go to from A is B
does that answer your question?
Logged
marcink
Jr. Member
Posts: 13
Re: another statemachine question...
«
Reply #2 on:
March 03, 2009, 04:32:57 »
hi neil,
yes, it is just to obvious...
thanks
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...