View Full Version : Expression 'records'[undefined]

18 Aug 2011, 3:25 PM
I am testing one of my sencha touch apps on an ipad. I am getting this error when I try and load my lists with stores. The app works fine on google chrome, safari for windows, and android emulator. I am sure the problem is with my store but I cannot understand the error. Here is the debug error.

TypeError: Result of expression 'records' [undefined] is not an object.

When I went to the associated line in the sencha touch debug, it says thus:

//FIXME: this is not a good solution. Ed Spencer is totally responsible for this and should be forced to fix it immediately.
for (var i = 0, length = records.length; i < length; i++) {
records[i].needsAdd = false;

I am unsure what the problem is. I have plenty of other applications that load the store fine, but for whatever reason, this one does not. Here is my store.


itemsStore = new Ext.data.Store({
model: 'Items',
proxy: {
type: 'ajax',
url: 'services/proxy/',
extraParams: {
url: 'a url for my store'
reader: {
type: 'json',
root: 'Items'

Here is my model


Ext.regModel('Items', {
fields: [
{name: 'title', type: 'string'},
{name: 'author', type: 'string'},
{name: 'book', type: 'string'}

As I said before I have testing the models and the stores with other browsers and systems, as well as jasmine. Something to do with the ipad doesnt like my stores. Any help would be appreciated. Cheers.