Results 1 to 6 of 6

Thread: help with Error: [Ext.createByAlias]

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    106
    Vote Rating
    0
      0  

    Default help with Error: [Ext.createByAlias]

    this is my view main.js
    Code:
    Ext.define('App.view.Main', {    
        extend: 'Ext.Container',   
        xtype: 'mainview', 
        
        requires: [
            'App.view.NavigationPanel',
            'App.view.ContentPanel',
        ],
        
        config: {
            fullscreen: true,   
            layout: 'fit',
            items: [  
                {   
                    xtype: 'navigationpanel',
                    id: 'myNavigationPanel',
                },
                {   
                    xtype: 'contentpanel',
                    id: 'myContentPanel',
                },
            ]
        },                
    });
    this is my controller main.js
    Code:
    Ext.define('App.controller.Main', {
    extend: 'Ext.app.Controller',
    
    config: {
    profile: Ext.os.deviceType.toLowerCase() , 
    refs:{
    main:{
    selector : 'mainview',
    xtype : 'mainview',
    autoCreate: true,
    },
    },
    
    },
    views : [
    'Main',
    'MenuList',
    'EditarList',
    'NovaPastaPanel',
    'TocList',
    'DocumentoPropriedadesPanel',
    'ContentPanel',
    'PastaPropriedadesPanel',
    'EnviarEmailPanel',
    'SlideShowPanel',
    ],
    
    
    stores: ['Tocs', 
    'MenuItems',
    'EditarItems',
    ],
    },
    the error
    Code:
    Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.mainview
    what i am doing wrong?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Is the App.view.Main class in the Main.js file loaded?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    106
    Vote Rating
    0
      0  

    Default

    How can i know ?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Use the dev tools. Type the class name in the console and if it's undefined the it hasn't been loaded. Check the network tab, has the file been loaded?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    106
    Vote Rating
    0
      0  

    Default

    In beta 3 works just fine ...tomorow i will try more thx

  6. #6
    Sencha User aflx's Avatar
    Join Date
    Jun 2011
    Location
    Berlin, Germany
    Posts
    64
    Vote Rating
    0
      0  

    Default

    I had the same problem with a panel after switching von B2/3 to RC1.

    After adding it into the views section in my application the error is gone.

    Code:
    Ext.application({
    ...
        views: [ 'my.view.component' ]
    ...
    });
    Alex

Posting Permissions

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