> IMHO, the additional convenience you get by adding these methods to > the Array prototype are just not worth screwing with a core language > element (even if other browsers offer them natively, which means they > don't appear in for ... in iterations there).
I would completely reverse that logic. The way you want to use an array, is what you _should_ just use an ordinary object for. Secondly, (key in .. ) are supposed to list all methods. The real bug is that it doesn't do that in firefox because they are built-in. A much better discussion would be how to solve _that_. All in all, the fact that (key in .. ) constructs don' t work correctly on arrays by default in IE or Firefox actually proves the opposite of what you were saying. That they are indeed special and 'hacked in'. You wanted to use (key in .. ) constructs without it giving you methods, unlike every other object which does give all its properties. The reason was a sparse array. You are aware that arrays in javascript do not work like arrays in php, right? There is no such thing as a sparse array. If you have an array where the value 'hello' is at indice 2, and the value 'world' is at indice 1000. Then you have a block of 1000 pointers in memory. The rest is just set to null. That is why you are not see-ing the built-in mehtods. That is not intentional, that is because it _is_ a very special and different datatype, that just behaves sort of like an object. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel