On Sun, Jan 18, 2009 at 11:55 AM, Mustafa Sak <m....@ims24-net.de> wrote:

>  Hi,
>
> it is possible, that IE puts automaticaly Elments in to a new Array by
> default?
>
> i tried this
>
> var xx = new Array();
> for (key in xx)
> {
>    this.debug(key);
> }
>
> In Firefox, i have no keys, like expected
>
> but at IE 6 i have this output:
>
> every some
> map
> filter
> forEach
> lastIndexOf
> indexOf
>
> Could this happen? Is there a work arround?
>

qooxdoo adds these functions to the Array prototype to provide a consistent
interface between browsers. Although it seems to work to iterate an Array
use for/in, it's not technically legal. That paradigm is for objects, not
arrays. Instead you should use indexes:

  for (var i = 0; i < xx.length; i++)
  {
    this.debug(i + ": " + xx[i]);
  }

Derrell
------------------------------------------------------------------------------
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

Reply via email to