-
18 Jan 2013 12:20 AM #1Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,494
- Vote Rating
- 56
[4.2.0.265] Store "add" event firing contract changed
[4.2.0.265] Store "add" event firing contract changed
Ext.data.Store does:
Code:add: function(arg) { if (Ext.isArray(arg)) { records = arg; } else { records = arguments; // BOOOOOOOOH }
Should normalize it to real array. Any 'instanceof Array' or Ext.isArray checks on the Records param fails now... Docs would also be lying right now since they state it should be an Array of records.
-
18 Jan 2013 12:26 AM #2
Care to elaborate? At what point are you overriding it?
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
18 Jan 2013 12:30 AM #3Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,494
- Vote Rating
- 56
Well, we have code similar to:
In the refresh method, we normalize to Array based onCode:store.on({ add : refresh, update : refresh, remove : refresh })
4.2.0.265 breaks this, don't think we're the only ones.Code:refresh: function (store, records) { var toDraw = []; if (!Ext.isArray(records)) { records = [records]; }
-
18 Jan 2013 12:42 AM #4
Ah, so you're saying the problem is with what's fired by the event/return value? If so, that's already taken care of: EXTJSIV-8201 for your reference.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!


Reply With Quote