summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/Async.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/Async.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/Async.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/frontend/gamma/js/Clipperz/Async.js b/frontend/gamma/js/Clipperz/Async.js
index 7c9d783..97d8ecf 100644
--- a/frontend/gamma/js/Clipperz/Async.js
+++ b/frontend/gamma/js/Clipperz/Async.js
@@ -62,7 +62,8 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
62 62
63 'callback': function (aValue) { 63 'callback': function (aValue) {
64 if (this._shouldTrace) { 64 if (this._shouldTrace) {
65 Clipperz.log("CALLBACK " + this._name, aValue); 65 //Clipperz.log("CALLBACK " + this._name, aValue);
66 console.log("CALLBACK " + this._name, aValue);
66 } 67 }
67 68
68 if (this.chained == false) { 69 if (this.chained == false) {
@@ -82,7 +83,8 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
82 resultMessage = "RESULT " + this._name + " <=="; 83 resultMessage = "RESULT " + this._name + " <==";
83 // this.addCallback(function(aResult) { 84 // this.addCallback(function(aResult) {
84 Clipperz.Async.Deferred.superclass.addCallback.call(this, function(aResult) { 85 Clipperz.Async.Deferred.superclass.addCallback.call(this, function(aResult) {
85 Clipperz.log(resultMessage, aResult); 86 //Clipperz.log(resultMessage, aResult);
87 console.log(resultMessage, aResult);
86 88
87 return aResult; 89 return aResult;
88 }); 90 });
@@ -106,8 +108,10 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
106 message = "[" + this._count + "] " + this._name + " "; 108 message = "[" + this._count + "] " + this._name + " ";
107 // this.addBoth(function(aResult) {Clipperz.log(message + "-->", aResult); return aResult;}); 109 // this.addBoth(function(aResult) {Clipperz.log(message + "-->", aResult); return aResult;});
108 this.addCallbacks( 110 this.addCallbacks(
109 function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;}, 111 //function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;},
110 function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;} 112 function(aResult) {console.log("-OK- " + message + "-->"/*, aResult*/); return aResult;},
113 //function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;}
114 function(aResult) {console.log("FAIL " + message + "-->"/*, aResult*/); return aResult;}
111 ); 115 );
112 } 116 }
113 117
@@ -116,8 +120,10 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
116 if (this._shouldTrace) { 120 if (this._shouldTrace) {
117 // this.addBoth(function(aResult) {Clipperz.log(message + "<--", aResult); return aResult;}); 121 // this.addBoth(function(aResult) {Clipperz.log(message + "<--", aResult); return aResult;});
118 this.addCallbacks( 122 this.addCallbacks(
119 function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;}, 123 //function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;},
120 function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;} 124 function(aResult) {console.log("-OK- " + message + "<--", aResult); return aResult;},
125 //function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;}
126 function(aResult) {console.log("FAIL " + message + "<--", aResult); return aResult;}
121 ); 127 );
122 } 128 }
123 }, 129 },
@@ -406,6 +412,7 @@ MochiKit.Base.update(Clipperz.Async.DeferredSynchronizer.prototype, {
406 } else if (this.numberOfMethodsDone() == this.methods().length) { 412 } else if (this.numberOfMethodsDone() == this.methods().length) {
407 this.result().callback(); 413 this.result().callback();
408 } else if (this.numberOfMethodsDone() > this.methods().length) { 414 } else if (this.numberOfMethodsDone() > this.methods().length) {
415 alert("Clipperz.Async.Deferred.handleMethodCallDone -> WTF!");
409 //WTF!!! :( 416 //WTF!!! :(
410 } 417 }
411 418