titanium - Cannot read property '__transform' of null data binding issue -


i getting error cannot read property '__transform' of null data binding issue.

the line of code of corresponding error resources section:

text: "undefined" != typeof $model.__transform["topic"] ? $model.__transform["topic"] : $model.get("topic") 

i assume somehow model not getting referenced correctly. here model code. in file chatthreadsql.js in models directory:

exports.definition = { config: {     "columns": {     "uuid":"text unique primary key",     "topic": "text",      "created":"text",     //"patient": "",     }, adapter: {     "type": "sql",     "collection_name": "chatthreadsql_col",     // idattribute tells alloy/backbone use column in     // table unique identifier field. without     // specifying this, alloy's default behavior create     // , "alloy_id" field uniquely identify     // rows in table text guid.     "idattribute": "uuid"     } },    extendmodel: function(model) {       _.extend(model.prototype, {          // extended functions go here      }); // end extend      return model; },   extendcollection: function(collection) {         _.extend(collection.prototype, {          // extended functions go here      }); // end extend      return collection; }  }; 

i have verified data being inserted sqlite3 using adb shell.

here view definition, view file chathome.xml

   <tableview datacollection="chatthreadsql"  id="table2">         <tableviewsection>         <tableviewrow id="row" title="{topic}" onclick="openchats" model="{uuid}" backgroundselectedcolor="#000080">             <label id="title" text="{topic}"/>             <label id="date" text="{date}"/>         </tableviewrow>         </tableviewsection>    </tableview> 

in controllers/chathome.js, have following line @ top of file:

var chatthreads = alloy.collections.chatthreadsql; 

any pointers appreciated!

other info:

application type: mobile titanium sdk: 3.1.3 platform & version: android 4. host operating system: ubuntu 13.04 

you set collection name chatthreadsql_col, have reference way in code.

try:

 <tableview datacollection="chatthreadsql_col"  id="table2">         <tableviewsection>         <tableviewrow id="row" title="{topic}" onclick="openchats" model="{uuid}" backgroundselectedcolor="#000080">             <label id="title" text="{topic}"/>             <label id="date" text="{date}"/>         </tableviewrow>         </tableviewsection>    </tableview> 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

javascript - Backbone.js getting target attribute -

html - Repeat image to extend header to fill screen -