Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

bug/regression: passing multiple functions as arguments does not work properly. #60

Closed humanchimp closed 13 years ago

humanchimp commented 13 years ago

If you pass multiple references to functions into a method on the now object, nowjs gets confused. It does not reliably (or at all) call back the correct function. I have created a trivial example that can be downloaded here. In your terminal, you can cd to the directory, and then type ./run. Alternatively, you can do node bug1.js.

Using nowjs 0.5.1, I get:

expected output:
first
second
third
actual output
(3) third
sridatta commented 13 years ago

This was an issue about how we were naming/keeping track of anonymous functions. I committed a fix to the repo and npm just now.