Small bugs in behavior.js

View: New views
1 Messages — Rating Filter:   Alert me  

Small bugs in behavior.js

by paul damer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I found a small problem in behavior.js.  Many of the for loops use
global variables as their counters or iterators.  I only discovered
this because some of the code I was working on had the same problem
and they were overwriting  each other's variables.

I can submit a patch if desired, but it is a simple fix:
Lines like this one using global h:

for (h=0;sheet=Behaviour.list[h];h++){

should be changed to use local h:

for (var h=0;sheet=Behaviour.list[h];h++){


Otherwise, behavior.js has been really great!

Cheers,
Paul


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group.
To post to this group, send email to behaviour@...
To unsubscribe from this group, send email to behaviour-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/behaviour?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price