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

client side callbacks do not work with ExtJS #17

Closed scottburch closed 13 years ago

scottburch commented 13 years ago

loading ext-base will cause callbacks not to be called

sridatta commented 13 years ago

Could you provide some additional information such as errors from the Webkit console or Firebug?

scottburch commented 13 years ago

this.indexOf is not a function - socket.io.js line 1748

I am going to download the socket stuff and try to determine the cause, but someone more familiar with it might be able to find it quicker.

ericz commented 13 years ago

All of these weird bugs with ExtJS is due to ext-core.js adding to Array.prototype. Subsequently, when you do a for in loop on an array, you traverse through not only the indicies but also you get the remove function added by ext-core.js. The solution is to change your code to check hasOwnProperty in the traversal or convert the loop to a regular for loop if you are certain that it will be an array and not an object. That is definitely a run on sentence. Anyways the NowJS component of this has been fixed. Hopefully similar issues dont crop up in socket.io