PDA

View Full Version : [FIXED][3.x] Menu initalConfig



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
});
}
}
...
});

evant
30 Apr 2009, 4:27 PM
Fixed in SVN.