FrozenCanuck / Ki

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

'currentStates' property is not observable/bindable #33

Open erichocean opened 13 years ago

erichocean commented 13 years ago

This works:

  valueBinding: SC.Binding.transform(function() {
    return "State: " + App.statechart.get('currentStates').map(function(state) { return state.get('fullPath'); }).join(', ');
  }).from('App.statechart.firstCurrentState')

This does not:

valueBinding: SC.Binding.transform(function(currentStates) {
  return "State: " + currentStates.map(function(state) { return state.get('fullPath'); }).join(', ');
}).from('App.statechart.currentStates')

I would expect currentStates to be observable for changes the same way that firstCurrentState is.

erichocean commented 13 years ago

By "works", I mean that value updates as the statechart changes state in the first case, but not in the second.