Closed GoogleCodeExporter closed 8 years ago
I made the revision and checked-in the code... please QA for me, and I'll
release it
once everything checks out.
Was this mistake causing any erroneous behavior?
Original comment by WestonRuter
on 6 Dec 2007 at 3:30
Yes. I was calling a method asynchronously passing params and callbacks as an
object
with named parameters, like this:
var cfg = {
sanitize: false,
methods: ['simple.hello']
};
var service = new rpc.ServiceProxy('/test-rpc.php', cfg);
var cfgCall = {
params: ['foo'],
onSuccess: function(s) {
alert(s);
},
onException: function(objError) {
alert(objError);
}
};
service.simple.hello(cfgCall);
In the original client code, this.__isAsynchronous was undefined in this
scenario so
it fell through to the line calling rpc.toArray. That's passed an array with one
element, the object cfgCall (in my example above). As that's not what
__callMethod is
expecting in this scenario, everything goes wrong from there...
Original comment by avarag...@gmail.com
on 6 Dec 2007 at 4:01
The diff looks good to me.
Original comment by avarag...@gmail.com
on 6 Dec 2007 at 4:06
Just noticed: rpc.version should be updated to 0.8.0.2.
Original comment by avarag...@gmail.com
on 6 Dec 2007 at 4:14
New version 0.8.0.2 has been released with this bug fix.
(I appreciate your help.)
Original comment by WestonRuter
on 6 Dec 2007 at 4:27
Original issue reported on code.google.com by
avarag...@gmail.com
on 6 Dec 2007 at 11:29