{"dojo.DeferredList":{"meta":{"requires":{"common":["dojo.Deferred"]},"functions":{"dojo.DeferredList":{"meta":{"summary":"","parameters":{"list":{"type":""},"fireOnOneCallback":{"type":"bool?"},"fireOnOneErrback":{"type":"bool?"},"consumeErrors":{"type":"bool?"},"canceller":{"type":"Function?"}},"src":"    this.list = list;\n    this.resultList = new Array(this.list.length);\n    \/\/ Deferred init\n    this.chain = [];\n    this.id = this._nextId();\n    this.fired = -1;\n    this.paused = 0;\n    this.results = [null, null];\n    this.canceller = canceller;\n    this.silentlyCancelled = false;\n    if (this.list.length === 0 && !fireOnOneCallback) {\n        this.callback(this.resultList);\n    }\n    this.finishedCount = 0;\n    this.fireOnOneCallback = fireOnOneCallback;\n    this.fireOnOneErrback = fireOnOneErrback;\n    this.consumeErrors = consumeErrors;\n    var index = 0;\n    var _this = this;\n    dojo.lang.forEach(this.list, function(d) {\n        var _index = index;\n        \/\/dojo.debug(\"add cb\/errb index \"+_index);\n        d.addCallback(function(r) { _this._cbDeferred(_index, true, r) });\n        d.addErrback(function(r) { _this._cbDeferred(_index, false, r) });\n        index++;\n    });","instance_variables":["list","resultList","chain","id","fired","paused","results","canceller","silentlyCancelled","list.length","finishedCount","fireOnOneCallback","fireOnOneErrback","consumeErrors"],"prototype_chain":["dojo.Deferred"]}},"dojo.DeferredList._cbDeferred":{"meta":{"summary":"","parameters":{"index":{"type":""},"succeeded":{"type":""},"result":{"type":""}},"src":"        this.resultList[index] = [succeeded, result];\n        this.finishedCount += 1;\n        if (this.fired !== 0) {\n            if (succeeded && this.fireOnOneCallback) {\n                this.callback([index, result]);\n            } else if (!succeeded && this.fireOnOneErrback) {\n                this.errback(result);\n            } else if (this.finishedCount == this.list.length) {\n                this.callback(this.resultList);\n            }\n        }\n        if (!succeeded && this.consumeErrors) {\n            result = null;\n        }\n        return result;","prototype":"dojo.DeferredList"}},"dojo.DeferredList.gatherResults":{"meta":{"summary":"","parameters":{"deferredList":{"type":""}},"src":"        var d = new dojo.DeferredList(deferredList, false, true, false);\n        d.addCallback(function (results) {\n            var ret = [];\n            for (var i = 0; i < results.length; i++) {\n                ret.push(results[i][1]);\n            }\n            return ret;\n        });\n        return d;","prototype":"dojo.DeferredList"}}}}}}