PDA

View Full Version : [RESOLVED][3.2.0][IE8] ExtJS not working at all



a.bongardt
7 Apr 2010, 3:26 AM
Hi,

I've been developing an ExtJS application for about a month now. Today I tried to open it in IE for the first time. ;)

I expected some layout issues or something similar, but I was very suprised when I had to see that it didn't work at all. My IE found an "error on this webpage": 'events' is null or not an object, line 18964 in ext-all-debug.js. If I use ext-all.js instead, the error message appears, too.

Here is the code snippet where it happens:



Ext.Container = Ext.extend(Ext.BoxComponent, {
// --- snip ---
applyDefaults : function(c){
var d = this.defaults;
if(d){
if(Ext.isFunction(d)){
d = d.call(this, c);
}
if(Ext.isString(c)){
c = Ext.ComponentMgr.get(c);
Ext.apply(c, d);
}else if(!c.events){ // here is the problem
Ext.applyIf(c, d);
}else{
Ext.apply(c, d);
}
}
return c;
},
// --- snap ---
}
I'm not sure what to do. The page works perfectly in Firefox and Chrome.

Thank you in advance.

-- Andy

P.S.: I used ExtJS 3.2.0 (final) and IE8 (all patches)

evant
7 Apr 2010, 3:28 AM
Probably an extra comma somewhere:



[{
},{
},{
},]

fay
7 Apr 2010, 3:35 AM
It's always worth running your code through www.jslint.com (http://www.jslint.com/) to catch problems like "trailing comma" (http://www.extjs.com/forum/showthread.php?p=2364).

a.bongardt
7 Apr 2010, 3:45 AM
You were both right... :)

Thanks a lot for these very quick replies.

I already scanned my scripts for extra commas, but I didn't find any. JSLint found it in a library I used for my app.

-- Andy

Edit: P.S.: Stupid IE... What a misleading error message!