PDA

View Full Version : Problem when ever creating a new store



ahsec
14 Nov 2012, 1:59 AM
Hello

I've been having this problem that I should not have!

Every time I create a new store(via Architect), when running the Chrome I get

Uncaught TypeError: Cannot call method 'on' of undefined

This is the store



Ext.define('MyApp.store.winAttTreeStore', {
extend: 'Ext.data.TreeStore',


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'winAttTreeStore',
root: {
expanded: true,
text: 'All Domains',
children: [

]
},
proxy: {
type: 'ajax',
reader: {
type: 'json'
}
},
fields: [
{
name: 'text'
}
]
}, cfg)]);
}
});
And nothing appears..It's just annoying..

Any one have any idea of how I avoid it?

Thanks

vietits
14 Nov 2012, 5:08 PM
I see no problem with your proxy definition except that proxy is missing url. Maybe the error happens at other place, not at this store definition.