Open milescui opened 12 years ago
exports.Class = BackboneView.extend({
type: 'tableview',
editable: true,
events: {
click: 'open',
"delete": function(e){
var model = todos.getByCid(e.rowData._modelCid);
todos.remove(model);
}
},
open: function(e) {
var model = this.getCollection().getByCid(e.rowData._modelCid);
model.set({ hasCheck: !model.get('hasCheck') });
},
});
this.getCollection() throw exception run on iphone, but it success run on android.
iphone Exception info:
[WARN] Exception in event callback. {
expressionBeginOffset = 665;
expressionCaretOffset = 685;
expressionEndOffset = 694;
line = 28;
message = "Result of expression 'this.getCollection()' [null] is not an object.";
name = TypeError;
sourceId = 300567264;
}
How to not through the global variables obtained todos reference?
thanks /Miles