maccman/spine — Issue #115: proxied doesn't work as expected
Author: jakub1979
Created: 2011-10-10 13:47:38+00:00
State: open

I'm currently playing around with the spine todo list tutorial and experienced some issues.
The proxied array seems to be ignored. If I use the proxy function explicitly everything works as expected.

Here is the TaskApp controller code:

Doesn't work:
// In this case the context is set to the model itself not the controller
proxied: ["addOne", "addAll", "renderCount"],

init: function () {
Task.bind("create", this.addOne);
Task.bind("refresh", this.addAll);
Task.bind("refresh change", this.renderCount);
//Task.fetch();
}

Works:
init: function () {
Task.bind("create", this.proxy(this.addOne));
Task.bind("refresh", this.proxy(this.addAll));
Task.bind("refresh change", this.proxy(this.renderCount));
//Task.fetch();
}