Hi there,
I've tried the sencha nested list tutorial and I got the following problem:
This is the application:
Code:
new Ext.Application({
name: "NestedListDemo",
launch: function() {
this.views.viewport = new this.views.Viewport();
}
});
Code:
This is the viewport:
NestedListDemo.views.Viewport = Ext.extend(Ext.NestedList, {
fullscreen: true,
title: 'Products',
store: NestedListDemo.music_store
});
This is the model:
Code:
Ext.regModel('ListItem', {
fields: [
{name: 'firstname', type: 'string'},
{name: 'lastname', type: 'string'},
{name: 'age', type: 'string'}
]
});
This is the store:
Code:
NestedListDemo.music_store = new Ext.data.TreeStore({
model: 'ListItem',
proxy: {
type: 'ajax',
url: 'tracks.json',
reader: {
type:'json',
root: 'items'
}
}
});
And this is my json document:
Code:
{"items":
[{
"firstname": "firstname1",
"lastname": "lastname1",
"age": "1"
},{
"firstname": "firstname2",
"lastname": "lastname2",
"age": "2"
},{
"firstname": "firstname3",
"lastname": "lastname3",
"age": "3"
}]
}
The tutorial says, that the screen should now show a list of the elements from the json document, but I get the following exception:
OPTIONS file:///C:/Dokumente und Einstellungen/lyth/workspace/NestedList/assets/www/tracks.json?_dc=1320850691003&node=root
- [COLOR=red !important]Uncaught TypeError: Cannot read property 'length' of undefined[/COLOR]
- [COLOR=red !important]Ext.data.TreeStore.Ext.extend.fillNode[/COLOR]sencha-touch.js:6
- [COLOR=red !important]Ext.data.TreeStore.Ext.extend.onProxyLoad[/COLOR]sencha-touch.js:6
- [COLOR=red !important](anonymous function)[/COLOR]sencha-touch.js:6
- [COLOR=red !important]Ext.data.Connection.Ext.extend.onComplete[/COLOR]sencha-touch.js:6
- [COLOR=red !important]Ext.data.Connection.Ext.extend.onStateChange[/COLOR]sencha-touch.js:6
- [COLOR=red !important](anonymous function)[/COLOR]
Anybody got an idea what to do now?
Thanks in advance
Greetings
Christine