Stoot98
26 Sep 2010, 9:20 AM
Hi Guys
Im trying to put together a simple app to get to grips with the Touch framework. So far everything is good but I've hit a problem when trying to extend a Store.
In my app if I define a List's Store inline, as below, the code works perfectly.
...
store: new Ext.data.Store({
model: 'MainMenuItem',
data: [{
Text: 'Browse'
}, {
Text: 'Search'
}]
})
..
However if i move this Store into a seperate extended class it breaks with the error " cannot read property 'proxy' of undefined".
MainMenu = Ext.extend(Ext.data.Store, {
initComponent: function(){
Ext.apply(this, {
model: 'MainMenuItem',
data: [{
Text: 'Browse'
}, {
Text: 'Search'
}]
});
MainMenu.superclass.initComponent.call(this);
}
});
Does anyone have any ideas?
Im trying to put together a simple app to get to grips with the Touch framework. So far everything is good but I've hit a problem when trying to extend a Store.
In my app if I define a List's Store inline, as below, the code works perfectly.
...
store: new Ext.data.Store({
model: 'MainMenuItem',
data: [{
Text: 'Browse'
}, {
Text: 'Search'
}]
})
..
However if i move this Store into a seperate extended class it breaks with the error " cannot read property 'proxy' of undefined".
MainMenu = Ext.extend(Ext.data.Store, {
initComponent: function(){
Ext.apply(this, {
model: 'MainMenuItem',
data: [{
Text: 'Browse'
}, {
Text: 'Search'
}]
});
MainMenu.superclass.initComponent.call(this);
}
});
Does anyone have any ideas?