FrozenCanuck / Ki

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

How to dynamically add states? #28

Closed ghost closed 13 years ago

ghost commented 13 years ago

I'm using Ki with sproutcore where I'm having a lot of independent modules with their own states.

I wonder how I could dynamically add one module's states in the current statechart?

Thanks.

FrozenCanuck commented 13 years ago

Right now there is no kind of event forwarding feature to tie statecharts together as a more cohesive whole. Essentially you have to do your own binding to connect one statechart with another statechart. So if you have a statechart A with a current state and it receives an event evt that needs to be forwarded on to another statechart B, then that current state will have to explicitly call statechart B's sendEvent method and pass it evt.