RangeError: Maximum call stack size exceeded
rodrigorm opened this issue · comments
This code generate the exception:
var SubController = Spine.Controller.sub({
release: function() {
this.constructor.__super__.release.apply(this, arguments);
}
});
var subject = new SubController();
subject.release();
Have you checked master? Working for me. Closing for now.
Sorry, my bad with the example:
This is not working:
var ParentController = Spine.Controller.sub({
release: function() {
this.constructor.__super__.release.apply(this, arguments);
}
});
var SubController = ParentController.sub({
release: function() {
this.constructor.__super__.release.apply(this, arguments);
}
});
var subject = new SubController();
subject.release();
Yes, because this.constructor.super is still set to ParentController.
You should be doing ParentController.prototype.release.apply(this, arguments)
Or use CoffeeScript ;)
Ok, thanks.