2009.11.27...5:45 am

Ext.iterate Array vs. Object Gotcha!

Jump to Comments

When calling Ext.iterate with an object the parameters passed back to the iterated function are:

(String key, Object value)

However when calling Ext.iterate with an array the parameters are:

(Object item, Number index, Array allItems)

The gotcha here is that in the Ext 3.0 docs only the object call back is shown.  Because of this you might think that the array call returns the index then the actual item bu as you can see that is not the case.

There is a thread on the Ext forum here about maybe making this consistent in the next major release.

Leave a Reply