I am very new to alloy collection and models. When i try to load a list in a table view taking the records from the sqlite db i get the error 'undefined' is not an object (evaluating '__alloyId12.on')'
Here is my location_list.xml
<Alloy> <Window id="thingsWindow" class="container"> <TableView id="tableview" dataCollection="location"> <Require src="location_row"></Require> </TableView> </Window> </Alloy>the
location_list.js file
var location=Alloy.Collections.location; location.fetch();
and the model file location.js
exports.definition = { config: { type: "sql", db_file:"/locationDB.sqlite", collection_name: "location" }, extendModel: function(Model) { _.extend(Model.prototype, { // extended functions and properties go here }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here }); return Collection; } };cannot figure out what exactly is this issue.