I have a model that listens for ventilation for the "update: TotalCost" event, which is fired from the (unrelated) collection C when any model M related to collection C changes.
This event is encoded in the initialization method, as shown below. When I receive an event, I get the following error:
TypeError: this.set is not a function of this.set ({"totalsale": value});
CostModel = Backbone.Model.extend({ defaults: { totalSale: 0, totalTax: 0 }, initialize: function(attrs, options) { if(options) { if(options.vent) { this.vent = options.vent; } } this.vent.on("update:TotalCost", function(value) { this.set({ "totalSale": value}); **
source share