FrozenCanuck / Ki

A Statechart Framework for SproutCore
http://frozencanuck.wordpress.com
Other
105 stars 7 forks source link

Multiple history states for one state? #18

Closed ghost closed 13 years ago

ghost commented 13 years ago

I've read your wiki page about history states.

It seems that one state can hold one history state (the substate that was last entered) right?

Is it possible to "log" all states that were entered so it would be like a browser's BACK and FORWARD button, jumping through all states you have been in?

Because now it seems that I can only jump back ONE state.

FrozenCanuck commented 13 years ago

Yes, you can use recursive history by doing the following:

gotoHistoryState('fooState', YES);

The YES argument tells Ki to follow history states recursively until there are no more to follow.