FrozenCanuck / Ki

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

Passing a SC object or string as the second parameter in gotoState() #23

Closed ghost closed 13 years ago

ghost commented 13 years ago

It seems that it's only possible to pass a hash {} as second argument in gotoState().

If I pass a string or a SC object it says:

"ERROR Ki.Statechart: Can not to goto state Ki.State<session.checkingIfUserIsSignedInAtYi, sc862>. Main.Ki.StateResponse:sc889 is not a recognized current state in statechart"

Is this a bug? It would be good to be able to pass strings, number, arrays but mostly I want to pass a SC object.

Thanks.

annismckenzie commented 13 years ago

Passing a hash like { foo: bar (SC.Object) } should work, right?

ghost commented 13 years ago

Yeah but shouldn't I be free to put whatever I want as the second argument and that will be passed on?

Seems unnecessary to wrap it around a hash {}.