PDA

View Full Version : bug in Ext.data.proxy.Direct createRequestCallback



adam.jimenez
8 Apr 2013, 3:52 AM
http://docs.sencha.com/ext-js/4-2/source/Direct.html

I'm trying to get this to work but it strikes me as a bug:


Shouldn't this:

createRequestCallback: function(request, operation, callback, scope){
var me = this;


return function(data, event){
me.processResponse(event.status, operation, request, event, callback, scope);
};
},

be:


createRequestCallback: function(request, operation, callback, scope){
var me = this;


return function(data, event, callback){
me.processResponse(event.status, operation, request, data, callback, scope);
};
},


Otherwise the data is not being passed. Might as well add callback in as well.

evant
8 Apr 2013, 3:54 AM
It does pass the data, because the data is included in the event. processResponse calls extractResponseData which is overridden in proxy.Direct.

adam.jimenez
8 Apr 2013, 5:52 AM
got it, but isn't the data param unnecessary and/ or misleading?