1. #1
    Sencha User ycuk's Avatar
    Join Date
    Sep 2011
    Posts
    7
    Vote Rating
    0
    ycuk is on a distinguished road

      0  

    Default Unanswered: Define store without mvc struc, var = mystore, etc

    Unanswered: Define store without mvc struc, var = mystore, etc


    How can i define store without mvc structure and instance as var?

    I want so:
    PHP Code:
    Ext.onReady(function(){

    Ext.define('CP_model_info', {
        
    extend'Ext.data.Model',
        
    alias'model.CP_model_info',
        
    fields: ['name''ivalue']
    });

    Ext.define('CP_store_info', {
        
    extend'Ext.data.TreeStore',
        
    models: ['CP_model_info'],
        
    alias'store.CP_store_info',
        ....
    });

    Ext.define('CP_menu_info', {
        
    extend'Ext.panel.Panel',
        
    alias'widget.view_info',
        .......
    });

        var 
    main Ext.create('Ext.Viewport', {
            
    renderTodocument.body,
        ....
        });

    }); 
    firebug answers:
    Store defined with no model. You may have mistyped the model name. http://..../AbstractStore.js?_dc=1320441479327

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,605
    Answers
    543
    Vote Rating
    326
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    There's a problem with your store config. Try:

    Code:
    Ext.define('CP_store_info', {
        extend: 'Ext.data.TreeStore',
        model: 'CP_model_info',
        alias: 'store.CP_store_info',
        ....
    });

  3. #3
    Sencha User ycuk's Avatar
    Join Date
    Sep 2011
    Posts
    7
    Vote Rating
    0
    ycuk is on a distinguished road

      0  

    Default


    no. too most

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,346
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by ycuk View Post
    no. too most
    Not sure what this means. skirtle is right that you had an error there but you still have to create your Store to use the new Class you created via Ext.define:

    Code:
    Ext.create('CP_store_info');
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 2