View Full Version : [FIXED-73] [3.x] Ext.iterate callback parameters
Condor
8 Jul 2009, 12:30 AM
This is not technically a bug, but an inconsistency.
When calling Ext.iterate with an array the callback parameters are:
(Object item, Number index, Array allItems)
But when calling Ext.iterate with an object the callback parameters are:
(String key, Object value)
I would like to suggest changing the callback parameters for objects to:
(Object value, String key, Object obj)
so it matches the array callback.
evant
8 Jul 2009, 12:37 AM
I think the horse has already bolted, we can't really change the parameter order, though we could pass the object itself as the 3rd parameter.
aconran
8 Jul 2009, 4:35 AM
Wish we would have seen this one before 3.0.0 final drop. Going to close this as we cannot change the API at this point.
Condor
8 Jul 2009, 4:56 AM
Wouldn't OPEN-DEF state be more appropriate?
aconran
8 Jul 2009, 5:10 AM
DEFered until 4.0? We can't break the API in the 3.x branch.
Animal
8 Jul 2009, 5:19 AM
How widely used is this new method among customers?
aconran
8 Jul 2009, 5:22 AM
So.... I'm marking this as OPEN but only to add the 3rd argument, not to switch the order.
Animal, you make a good point but if we doc it and its in the docs then people will use it (even if they don't need to) :D
mschwartz
8 Jul 2009, 6:03 AM
You can add API methods:
Ext.iterateArray()
Ext.iterateObject()
Mark in the docs that the old iterate() is deprecated.
mjlecomte
8 Jul 2009, 12:30 PM
You can add API methods:
Ext.iterateArray()
Ext.iterateObject()
Mark in the docs that the old iterate() is deprecated.
This would not help, the point is that we're striving to only remove deprecated items or make a breaking change in the API in the next major release (4.x).
Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.