lookup in Ext.StoreManager.lookup is not defined

extjs, sencha-touch-2

Solution

Your store config should be like this:

Ext.define('MyApp.store.Tables', {
    extend: "Ext.data.Store",
    config: {
        model: "MyApp.model.Table",
        data : [{
            text: "Ed",    
            value: "Spencer"
        }, {
            text: "Tommy", 
            value: "Maintz"
        }]
    }
});

And place this into your LoginForm.js:

{
      xtype: 'selectfield',
      store: 'Tables'
}

I have tested. It is working fine.

Problem

This is my view: ``` Ext.define('MyApp.view.Login.LoginForm',{ extend: 'Ext.form.Panel', alias: 'loginForm', requires: ['Ext.form.FieldSet', 'Ext.Img'], config: { items: [ { xtype: 'fieldset', items: [ { xtype: 'textfield', name: 'username', required: true },{ xtype: 'textfield', name: 'password', required: true, inputType: 'password' },{ xtype: 'selectfield', //*****************the problem is here**************** store: Ext.StoreManager.lookup('MyApp.store.Tables') //store: Ext.StoreManager.lookup('Tables') } ] },{ xtype: 'button', text: 'Login', } ] } }); ``` It says that it cannot use `lookup of undefined`, so I'm thinking that MyApp doesn't see Ext.StoreManager. I've also tried `Ext.data.StoreManager.lookup` and `Ext.StoreMgr`. BTW. the store really exist.

Original source