mjlecomte
29 Apr 2009, 5:25 AM
initialConfig
initComponent: function(){
if(Ext.isArray(this.initalConfig)){
Ext.apply(this, {items:this.initalConfig});
}
Condor
29 Apr 2009, 6:39 AM
IMHO the code should be moved to the constructor anyway:
Ext.menu.Menu = Ext.extend(Ext.Container, {
...
constructor: function(config){
if(Ext.isArray(config)){
config = {items:config};
}
Ext.menu.Menu.superclass.constructor.call(this, config);
},
initComponent: function(){
this.addEvents(
'beforeshow',
'beforehide',
'show',
'hide',
'click',
'mouseover',
'mouseout',
'itemclick'
);
Ext.menu.MenuMgr.register(this);
Ext.menu.Menu.superclass.initComponent.call(this);
if(this.autoLayout){
this.on({
add: this.doLayout,
remove: this.doLayout,
scope: this
});
}
}
...
});
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.