PDA

View Full Version : 4.1beta2 IE8 runtime error?



teruma
14 Feb 2012, 4:01 PM
I used ExtJS4.1b2 with IE8 and encountered the runtime error.
It's a problem of the framework:-/


ext-all-debug.js
line 16116


Microsoft JScript runtime error: 'null' is null or not an object



16107 if (Ext.isIEQuirks || Ext.isIE && Ext.ieVersion <= 8){
16108 Ext.Array.forEach('Top Right Bottom Left'.split(' '), function(side){
16109 var borderWidth = 'border' + side + 'Width',
16110 borderStyle = 'border' + side + 'Style';
16111
16112 Ext.dom.Element.prototype.styleHooks['border-' + side.toLowerCase() + '-width'] = {
16113 name: borderWidth,
16114 get: function (dom) {
16115 var currentStyle = dom.currentStyle;
16116 if (currentStyle[borderStyle] == 'none'){
16117 return '0px';
16118 }
16119 return currentStyle[borderWidth];
16120 }
16121 };
16122 });
16123 }

mitchellsimoens
15 Feb 2012, 4:59 AM
What code were you running when this happened?

teruma
15 Feb 2012, 8:41 PM
sorry.
Apparently, it seems to have been my problem.
I was making the portlet using highcharts based on the portal application of the example.
It occurred when Ext.Panel was used.
However, it operated well when Ext.Container was used.

My means is uncertain.

daniel.locus
1 Mar 2012, 6:08 PM
by debugging it I see the dom.currentStyle value doesnt set to the variable, there for the next line variable currentStyle is null and thus throw out exception. the wierd thing is, I added a breakpoint and dom.currentStyle is null, but after the dom.currentStyle been watched, it generates a value. I've never seen this before, guess there is something hidden in the dom function.

My solution is adding a patch:

if(!currentStyle || currentStyle[borderStyle]=='none'){
...
}

not sure it is correct but at least the code runs smoothly now.

teruma
1 Mar 2012, 8:51 PM
Thank you for the valuable information.
The patch was applied, and it came to operate smoothly:)

skirtle
3 Mar 2012, 7:03 AM
I just checked beta-3 and it seems that the code in question no longer exists. You may wish to test against that version.

teruma
3 Mar 2012, 3:30 PM
Thank you.
It began to test beta-3. It goes well it:)