PDA

View Full Version : [FIXED][3.0.3] global variable "s" in Ext.util.Event.findListener()



mystix
4 Dec 2009, 8:32 AM
fix in red:


findListener : function(fn, scope){
var list = this.listeners,
i = list.length, l, s;
while(i--) {
l = list[i];
if(l) {
s = l.scope;
if(l.fn == fn && (s == scope || s == this.obj)){
return i;
}
}
}
return -1;
},

VinylFox
4 Dec 2009, 8:35 AM
Am I totally missing something? How is that global?

Is it not part of the var that is started on the previous line?

mystix
4 Dec 2009, 8:36 AM
i also found a global variable s in the ListView example (built using SVN trunk).
it's an instance of Ext.list.Sorter, but i haven't managed to track down the offending code as yet.

mystix
4 Dec 2009, 8:37 AM
Am I totally missing something? How is that global?

Is it not part of the var that is started on the previous line?

the "s" in red which belongs to the var started on the previous line isn't in the codebase (it's added by me) :).

[edit]
did you miss out the "fix in red" line that's before the code snippet?

VinylFox
4 Dec 2009, 8:50 AM
LOL - Yep, that's exactly what I missed :)

More coffee now please!

Jamie Avins
4 Dec 2009, 11:02 AM
Fixed in Ext-Core 116