PDA

View Full Version : TabPanel and 'Ext.fly(...)' is null or not an object error



Silenius
4 Dec 2007, 6:28 PM
Hello all,

I've spend a lot of time trying to understand why the 'Ext.fly(...)' is null or not an object error was happening in TabPanel (when changing tab in IE6 and IE7).

The solution I've found is quite simple, you just have to override the getTarget method, hope this can help someone.


Ext.override(Ext.EventObjectImpl, {
getTarget : function(selector, maxDepth, returnEl){
var targetElement;

try {
targetElement = selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : this.target;
} catch(e) {
targetElement = this.target;
}

return targetElement;
}
});

Samuel

mystix
4 Dec 2007, 6:47 PM
hmmm? what's the test code you used on IE6?

njw
30 Sep 2008, 3:12 AM
Hello all,

I've spend a lot of time trying to understand why the 'Ext.fly(...)' is null or not an object error was happening in TabPanel (when changing tab in IE6 and IE7).

The solution I've found is quite simple, you just have to override the getTarget method, hope this can help someone.


Ext.override(Ext.EventObjectImpl, {
getTarget : function(selector, maxDepth, returnEl){
var targetElement;

try {
targetElement = selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : this.target;
} catch(e) {
targetElement = this.target;
}

return targetElement;
}
});Samuel

I had the same issue with IE7 and a TreePanel/Node Click event, however, I'm using EXT 2.2.0.

The above override fixed it just fine.

Thanks!

ManishDevraj
9 Dec 2008, 6:35 AM
Hello,

I am getting the same problem on IE7, I have added above code snippet into my application's JS but not able to get rid of the error. Is there any other way to add this snippet?

mark.lancaster
8 Mar 2009, 6:21 PM
This solution also worked for me using IE6 and Ext 2.2.0

Thanks

Vicho
3 Jun 2009, 5:10 AM
I have the same problem... but, a silly question... where put this lines??... in which file? please I am a newbie... thanks in advance!!

Chods
18 Jun 2009, 5:01 AM
I have also just implmented the same fix although i am not too happy about it. I dont know why this is happening.

georgec
26 Jun 2009, 12:51 AM
I have had the same problem,.
The above fix just prevents the error from being thrown.

I have extjs in an iframe and when the user right clicks a menu with some menu items appears. Before I inserted a fix an error was thrown when an item was selected.
After the fix no error is thrown but choosing the menu item has no effect whatsoever.

I am suspecting it is because this.target for some reason appears to be null in IE..

skolapper
3 Sep 2009, 8:07 AM
I am rendering a grid in my project.On firefox, this code works fine.However in IE 7 I get the following error:undefined is null or not an objectI believe the error is occuring on Line 239 in ext-all.js and the following section is highlighted:iftypeof _1i.dataIndex=="undefined"I feel as if Im not providing enough information for you guys to help me with my problem, let me know what else I should provide

tof
22 Jan 2010, 2:50 AM
f*cking IE...

Well this override is a hacky workaround, but it does work.

Thank you.

florin.raicu
7 Feb 2010, 7:02 AM
I'm having the same problem. I have a list of tabs in the tap panel and when selecting (strange is that first selection works, but not the second time) some of them I get the above error.

How exactly should apply the above code? Where should I put it?

tof
8 Feb 2010, 2:43 AM
The override is a simple quick'n dirty workaround.

The code just have to be executed before yours.

dennichristianthegreate
1 Feb 2011, 2:12 AM
hmmm ok, I thought that too. We have another user who get some kind of java error when trying to get in. But she has problems with java based chats. But i think the problem is on her side and not anything else. So we will see how that goes. The chat is great tho The best one Ive seen so far. It will be fun experimenting with it. Thanx a bunch for your help