PDA

View Full Version : [3.0.2] ERROR: this.layout.layout is not a function



fermo111
15 Oct 2009, 6:37 AM
I have given a try to the 3.0.2 version, and my app does not work any more. I get the error:

ext-all-debug.js (line 18140): this.layout.layout is not a function

I have added a couple of lines at line 18140, as follows:

if (rendered && this.layout) {
if (!this.layout.layout)
console.debug("force = %o, forceLayout = %o, this.layout = %o", force, forceLayout, this.layout);
this.layout.layout();
}

and this is what I get:

force = false, forceLayout = false, this.layout = "border"

So, this.layout is a string.

What has changed from 3.0.0 to 3.0.2 that can be the cause of this problem?

As a small note, line 18127 is terminated by a ';' instead of a ',' as it was before. Is it intentional?

Thanks

venky0589
11 Nov 2009, 11:30 AM
I have given a try to the 3.0.2 version, and my app does not work any more. I get the error:

ext-all-debug.js (line 18140): this.layout.layout is not a function

I have added a couple of lines at line 18140, as follows:

if (rendered && this.layout) {
if (!this.layout.layout)
console.debug("force = %o, forceLayout = %o, this.layout = %o", force, forceLayout, this.layout);
this.layout.layout();
}and this is what I get:

force = false, forceLayout = false, this.layout = "border"

So, this.layout is a string.

What has changed from 3.0.0 to 3.0.2 that can be the cause of this problem?

As a small note, line 18127 is terminated by a ';' instead of a ',' as it was before. Is it intentional?

Thanks

I am also facing the same issue with Extjs 3.0.2,(Extjs3.0 is working fine), can anyone help us.

In my case when i am trying to set layout to viewport and dynamically adding items
here is the code
new Ext.Viewport({
id: 'xxx',
layout: {
type: "border",
enableTabScroll:true,
deferredRender:true,
forceLayout: true
}

});

If i use Ext.Panel insted viewport it is working, In case of ViewPort it is giving this.layout.layout is not a function.

Thanks
venky....

dwfresh
12 Jan 2010, 4:24 PM
Did anyone get a solution to this. I am trying to upgrade from 2.2 to 3.1 and get this error.
In my case, this.layout is a string ie: 'toolbar', which is why the error.
any ideas would help me a lot.
!!

dwfresh
26 Jan 2010, 3:29 PM
FYI, i found the issue with my error. In the afterRender 'override' event i was not calling the superclass.afterRender method. For some reason in 2.2 it worked anyways, but not in 3.0+

johnsbrn
27 Jan 2010, 10:04 AM
Did anyone get a solution to this. I am trying to upgrade from 2.2 to 3.1 and get this error.
In my case, this.layout is a string ie: 'toolbar', which is why the error.
any ideas would help me a lot.
!!

I had that same problem, it had something to do with either the autorefresh plugin or the page size plugin, can't remember which.

44gatti
3 Jun 2010, 5:09 PM
when window renders first time ( or after show event), win.layout config is processed and becomes an object.
test it:

test1:


win = new Ext.Window({...,layout:'fit',..});
win.on('show',function(){
//not important code
},this,{single:true});

win.on('resize',function(win,adjWidth,adjHeight,rawWidth,rawHeight){
this.doLayout();
console.log(win.layout);
},win);
win.show();

//get 'fit' in console.log
test2:


win = new Ext.Window({...,layout:'fit',..});

win.on('show',function(){
win.on('resize',function(win,adjWidth,adjHeight,rawWidth,rawHeight){
this.doLayout();
console.log(win.layout);
},win);
},this,{single:true});//deregister 'on show' listener after first call

win.show();

//get object 'Layout' in console.log


OK??