I have an array of an unknown number of deferreds that I'm trying to resolve with $.when. When all the deferreds have been resolved, will the '.then' function give me back the resolved deferreds in the same order as I entered then in the array?
Pseudo code example:
var deferreds = [];
for(0,1,2,...,x) {
var def = JsonRpc(...);
deferreds.push(def);
}
$.when.apply($, deferreds).then(function () {
console.log(arguments.length); //outputs a number >= 0
for(0,1,2,...,x) {
console.log("Defered: ", arguments[0,1,2,...,x])
}
});
Will deferreds[0] be equal to arguments[0] and deferreds[x] be equal to arguments[x]?
Thanks in advance for any and all replies! //Edvin