PDA

View Full Version : Undefined variable: "ci"



matjaz
27 Jun 2007, 6:43 AM
It's no big deal, but it doesn't look nice. There is some "ci" global variable name popping on each page, where Ext is included. At least in Ext 1.1.beta1. So I hunted it down.

In DomQuery in function byAttribute() there is line
for(var i = 0; ci = cs[i]; i++){where ci variable is not defined so it registers as global.
for(var i = 0, ci; ci = cs[i]; i++){fixes that.

Hope it will be fixed in next beta.

Cheers B)

jack.slocum
27 Jun 2007, 7:59 AM
Thanks! I changed the code. There was also one in last-child I found and fixed at the same time (n).

matjaz
27 Jun 2007, 9:27 AM
Sure ! No problem ! I'm glad you fixed it :)

Right now I'm hunting variable named id which has a values "ext-gen1" ... I suspect it's somewhere in Ext.get() or around there...

jack.slocum
27 Jun 2007, 3:29 PM
I hunted for that one for a while myself a while back. It is an "id" attribute assigned to the window object, which makes it appear as a global variable even though it isn't.