Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spine.js - How do you unbind a specific event handler from a model instance using JavaScript?

It's pretty easy to unbind specific event handlers from model classes, but it seems the only way to unbind an event handler from an instance of a model is to unbind ALL event handlers attached to that instance using unbind() (takes no arguments).

Is there an equivalent to Model class' unbind([eventName, function]) function for model instances, or is there another better way to unbind specific handlers without unbinding them all?

I've looked through the Spine.js documentation but no luck so far. Adding arguments to the unbind() function has no effect - it just ignores them and unbinds all anyway.

like image 211
Davecheesefish Avatar asked Jan 22 '13 11:01

Davecheesefish


1 Answers

In the end we switched to a more suitable framework for our needs, Backbone.js. Maintenance on the Spine.js GitHub repository seems to have ground to a halt in September last year and, though Spine supports use with JavaScript, the documentation for it is pretty poor.

If anyone can provide a working solution to the original problem I'll still accept it for the benefit of anyone else who stumbles across this.

like image 133
Davecheesefish Avatar answered Nov 14 '22 23:11

Davecheesefish