1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    wanclark is on a distinguished road

      0  

    Default Help? error code: ext-all.js => this.toolbars is undefined

    Help? error code: ext-all.js => this.toolbars is undefined


    Hi, with ext3, I want to extend Ext.Toolbar, the code is:
    PHP Code:
    Ext.app.Header = function(groups){            
        
    Ext.app.Header.superclass.constructor.call(this, {
            
    id:"ux-header",
            
    region:"north",
            
    border:false,
            
    height:42
        
    });
        
    this.groups groups;
        
    this.init();
    };

    Ext.extend(Ext.app.HeaderExt.Toolbar, {    
        
    init : function(){
            
    me this;        
            
    Ext.each(me.groups, function(group){ me.addItem(new Ext.app.Module(group));  me.loadCssLang(group); });
            
    me.add('->''<img src="views/resources/images/powered-by.png" alt="logo" />');
        },
        
        
    loadCssLang: function(group){
            var 
    css ='views/modules/'+group.group+'/Resources/style.css';
            var 
    lang 'views/lang/'+group.lang+'/'+group.group+'.js';

            var 
    cssref=document.createElement("link");
            
    cssref.setAttribute("rel""stylesheet");
            
    cssref.setAttribute("type""text/css");
            
    cssref.setAttribute("href"css);
            
    document.getElementsByTagName("head")[0].appendChild(cssref);
            
            var 
    langref=document.createElement("script");
            
    langref.setAttribute("type""text/javascript");
            
    langref.setAttribute("src"lang);
            
    document.getElementsByTagName("head")[0].appendChild(langref);
        }
    }); 
    the error shows by firebug: this.toolbars is undefined (ext-all.js)
    Anybody can tell me what's wrong?

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,

    Did you tried ext-all-debug.js
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    wanclark is on a distinguished road

      0  

    Default


    Thanks, solved it.

Thread Participants: 1

Tags for this Thread