PDA

View Full Version : [2.0b1][CLOSED] Bug in Container.setLayout



tof
22 Oct 2007, 3:10 AM
panel.setLayout can throw an error if monitorResize is true (for fit container).

The source of the problem is here in ContainerLayout.js:

setContainer : function(ct){
if(this.monitorResize){
if(ct && this.container && ct != this.container){
this.container.un('resize', this.onResize, this);
}
ct.on('resize', this.onResize, this);
}
this.container = ct;
},


Because in Container.js, setContainer is called with 'null' if changing layout, so "ct" is null !


setLayout : function(layout){
if(this.layout && this.layout != layout){
this.layout.setContainer(null);
}
this.initItems();
this.layout = layout;
layout.setContainer(this);
},


I suppose 'setContainer' should verify that 'ct' is not null.

jack.slocum
22 Oct 2007, 2:01 PM
setLayout is a private function used internally at initialization time by Ext. It is marked as such. It is not something you can call at any time.

uttamthakor
28 Nov 2007, 4:22 AM
Hi, jack
How can I Change the layout of container at runtime.?

mystix
28 Nov 2007, 6:58 AM
Hi, jack
How can I Change the layout of container at runtime.?

pls post in help, not bugs, for help-related questions. thanks.