Lines Matching refs:Deferred
24 // * slim down Deferred and RPC scripts
497 // crazy hack for IE that relies on the "deferred" behavior of script
566 // the Deferred class, borrowed from Twisted Python and Dojo
578 * Deferred is canceled.
585 Deferred = function(/*Function?*/ canceller, timeout){
587 // var deferred = new Deferred();
588 // setTimeout(function(){ deferred.callback({success: true}); }, 1000);
589 // return deferred;
610 * Cancels a Deferred that has not yet received a value, or is waiting on
611 * another Deferred as its value. If a canceller is defined, the canceller
616 Deferred.prototype.cancel = function() {
627 var msg = 'Deferred Cancelled';
639 (this.results[0] instanceof Deferred)
652 Deferred.prototype._resback = function(res) {
662 * determine if the deferred has already been resolved
666 Deferred.prototype._check = function() {
682 Deferred.prototype.callback = function(res) {
693 Deferred.prototype.errback = function(res) {
708 * @return {Deferred} this
711 Deferred.prototype.addBoth = function(cb, cbfn) {
718 * as the handler for successful resolution of the Deferred. May be called
726 * @return {Deferred} this
729 Deferred.prototype.addCallback = function(cb, cbfn /*...*/) {
735 * Add a function as the handler for errors in the Deferred. May be called
741 * @return {Deferred} this
744 Deferred.prototype.addErrback = function(cb, cbfn) {
752 * @return {Deferred} this
755 Deferred.prototype.addCallbacks = function(callback, errback) {
764 * when this Deferred is satisfied, pass it on to def, allowing it to run.
765 * @param {Deferred} def A deferred to add to the end of this Deferred in a chain
766 * @return {Deferred} this
769 Deferred.prototype.chain = function(def) {
779 Deferred.prototype._fire = function() {
796 if (res instanceof Deferred) {
822 // deferred is already fired
1163 this.initDeferred = new Deferred();
1222 var d = new Deferred();
1349 * Calls a remote method asynchronously and returns a Deferred object
1356 * @param {CFInstance.Deferred} deferred Optional A Deferred to use for
1357 * reporting the response of the call. If no deferred is passed, a new
1358 * Deferred is created and returned.
1359 * @return {CFInstance.Deferred}
1362 RPC.prototype.callRemote = function(method, params, timeout, deferred) {
1363 var d = deferred || new Deferred(null, timeout || -1);
1397 * calls. Returns a Deferred that is called back when both sides have
1401 * @return {CFInstance.Deferred}
1640 CFInstance.Deferred = Deferred;