Results 1 to 2 of 2

Thread: Store does not exist unless Ext.create is used

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Location
    White Rock, BC Canada
    Posts
    167
    Answers
    12

    Default Store does not exist unless Ext.create is used

    I have a store defined as follows:
    Code:
    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:
    Code:
    var store = Ext.getStore('casesStore');
    store has a reference to the store. In Ext, I seem to have to put:
    Code:
    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?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    You should be able to call

    var store = this.getCasesStore();

    Scott.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •