Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Error:'undefined' is not an object (evaluating '__alloyId12.on')

$
0
0

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.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>