PDA

View Full Version : [CLOSED]4.0.4a refs or Ext.Array.each bug on IE 9 with browser mode 8 and 7



kayowas
10 Aug 2011, 8:32 AM
EDIT: There is a typo error on the subject. I'm refering to 4.0.2a, and not to 4.0.4a, if there's such a revision!

When initializing an MVC app using IE 9 with browser mode 8 and 7, I get the following exception:

SCRIPT5007: Unable to get value of the property 'ref': object is null or undefined
ext-all-debug.js, line 940 character 21

Going to the source (ext-all-debug.js) I found out actually that line 21400 is the one to blame.

It seems that the "each" method used to iterate thru the refs is passing an extra time, as if the array had an additional index which it has not, and passes an undefined argument "info". workaround is to check whether info is an object or not as follows:


ref: function(refs) { var me = this;
refs = Ext.Array.from(refs);
Ext.Array.each(refs, function(info) {
if(info) {
var ref = info.ref,
fn = 'get' + Ext.String.capitalize(ref);
if (!me[fn]) {
me[fn] = Ext.Function.pass(me.getRef, [ref, info], me);
}
}
});
},


Let me stress again that this is under IE 9 with compatibility mode, and I'm not testing in real IE 8 and 7 to be sure. But I think it's good enough info to check this bug out, since I think a lot of people might be using refs with their MVC architecture.

Cheers,
Nicolas.

mankz
10 Aug 2011, 10:00 AM
Could you post a simple test case?

kayowas
19 Aug 2011, 10:49 PM
Hi manks, sorry for the delay, i've been very bussy!

Sorry as well for this post. It was my bad after all... A tini-tiny cheeky coma was in my code, and it fooled IE as to think that the array had an extra index.

Dunno if that is a bug or not, but that's not the same case anymore.

Anyways, thanks for your prompt reply!

Cheers,
Nicolas.