harley.333
7 Aug 2007, 10:17 PM
I'm assuming this is a bug; please correct me if I'm wrong.
SimpleStore doesn't apply its config object in its constructor (I found this because my sortInfo settings were having no effect). I made the following modification to correct it:
Ext.data.SimpleStore = function(config){
Ext.data.SimpleStore.superclass.constructor.call(this, Ext.applyIf(config, {
reader: new Ext.data.ArrayReader({
id: config.id
},
Ext.data.Record.create(config.fields)
),
proxy : new Ext.data.MemoryProxy(config.data)
}));
this.load();
};
Ext.extend(Ext.data.SimpleStore, Ext.data.Store);
Here's the original code, for reference:
Ext.data.SimpleStore = function(config){
Ext.data.SimpleStore.superclass.constructor.call(this, {
reader: new Ext.data.ArrayReader({
id: config.id
},
Ext.data.Record.create(config.fields)
),
proxy : new Ext.data.MemoryProxy(config.data)
});
this.load();
};
Ext.extend(Ext.data.SimpleStore, Ext.data.Store);
Thanks,
Harley
SimpleStore doesn't apply its config object in its constructor (I found this because my sortInfo settings were having no effect). I made the following modification to correct it:
Ext.data.SimpleStore = function(config){
Ext.data.SimpleStore.superclass.constructor.call(this, Ext.applyIf(config, {
reader: new Ext.data.ArrayReader({
id: config.id
},
Ext.data.Record.create(config.fields)
),
proxy : new Ext.data.MemoryProxy(config.data)
}));
this.load();
};
Ext.extend(Ext.data.SimpleStore, Ext.data.Store);
Here's the original code, for reference:
Ext.data.SimpleStore = function(config){
Ext.data.SimpleStore.superclass.constructor.call(this, {
reader: new Ext.data.ArrayReader({
id: config.id
},
Ext.data.Record.create(config.fields)
),
proxy : new Ext.data.MemoryProxy(config.data)
});
this.load();
};
Ext.extend(Ext.data.SimpleStore, Ext.data.Store);
Thanks,
Harley