PDA

View Full Version : [NOREPRO] bug in Ext.util.JsonP.request in Sencha Touch 2



pabloflores
27 Oct 2012, 5:34 PM
I been having a lot of problems with the request function. I see that the data is returned by the server, but client is failing with timeout error.etc.

After much debugging, I believe that i found the problem. There is a bug in the function


handleResponse: function(result, request){
var success = true;


if (request.timeout) {
clearTimeout(request.timeout);
}


Basically, the request object is coming in the 4th parameter, not in 2nd.
The 2nd parameter turns out to be the http status code(ie. 200)
I changed it to the following, and code is now working.


handleResponse: function(result, param2, param3, request){

I am running the latest Sencha Touch 2 code.

Could someone at Sencha confirm this.


Thank you,

Pablo

mitchellsimoens
28 Oct 2012, 6:18 AM
Working for my in 2.1.0 RC2 and our latest code:


Ext.data.JsonP.request({
url : 'data/php.php',
success : function(json) {
console.log(json);
}
});

response:


Ext.data.JsonP.callback1({
"foo" : "bar"
});