PDA

View Full Version : Store does not exist unless Ext.create is used



WagsMax
2 Oct 2012, 7:58 PM
I have a store defined as follows:

Ext.define('ATMgo.store.Cases', {
extend: 'Ext.data.Store',
storeId: 'casesStore',
alias: 'store.cases',
requires: [
'ATMgo.model.Cases'
],


autoLoad: true,
model: 'ATMgo.model.Cases',
proxy: {
type: 'memory'
}
});

In Sencha Touch, stores are automatically created, so that after:

var store = Ext.getStore('casesStore');
store has a reference to the store. In Ext, I seem to have to put:

Ext.create('ATMgo.store.Cases', {});
to make the store exist, otherwise after the getStore above, store remains undefined.
Am I missing something that automatically creates the store?

scottmartin
9 Oct 2012, 2:01 PM
You should be able to call

var store = this.getCasesStore();

Scott.