FrozenCanuck / Ki

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

Move states from statechart to views? #26

Open ghost opened 13 years ago

ghost commented 13 years ago

Now when you can have states in the view's im wondering when you would want to have them in the views instead of in the statechart.

Eg. I have a TabView with 4 page views ... when I switch page I want to enter that page's state. Is it possible/correct to put those states in the page views instead of the statechart?

This would be kinda like a better approach in my mind, because now my statechart is actually only mirroring the structure of the views and as the application grows it becomes easily unmanageable and I have to play detective and keep the mapping between the statechart and the views hierarchy updated.

It's kinda radical but if I move the whole statechart structure out to the views, this mapping problem seems to be solved. But I would like to know if this is one of the way I should use the new states in the views API for.