tracing dictionnary result one time only
authorFrederic PAUT <frederic.paut@linux.intel.com>
Wed, 3 Jul 2013 13:03:16 +0000 (15:03 +0200)
committerFrederic PAUT <frederic.paut@linux.intel.com>
Wed, 3 Jul 2013 13:03:16 +0000 (15:03 +0200)
doc/agent/client.html

index 27ddc6e..123779c 100644 (file)
@@ -48,13 +48,15 @@ function gotDictResult(result) {
 
 function gotDivResult(result) {
   cloudeebus.log("gotDivResult: " + result);
-  var dictionary = {Name: "Mickey",
-                                Sisters: [""], 
-                                Married: true,
-                                Divorced: 0,
-                                Friends: ["Donald", "Dingo"],
-                                Others: [""]};
-  sampleProxy.Variant(dictionary).then(gotDictResult,errorCB);  
+  if (result % 1 == 0) {
+         var dictionary = {Name: "Mickey",
+                                        Sisters: [""], 
+                                        Married: true,
+                                        Divorced: 0,
+                                        Friends: ["Donald", "Dingo"],
+                                        Others: [""]};
+         sampleProxy.Variant(dictionary).then(gotDictResult,errorCB);
+  }  
 //  sampleProxy.Release();
 }
 
@@ -88,7 +90,7 @@ function connectSuccess() {
   cloudeebus.SessionBus().getObject("org.cloudeebus.Sample", "/org/cloudeebus/Sample", gotProxy, errorCB);
 }
 
-cloudeebus.connect("ws://localhost:9002", manifest, connectSuccess, errorCB);
+cloudeebus.connect("ws://localhost:9003", manifest, connectSuccess, errorCB);
 </textarea>
                <br>
                <input type="button" value="run script" onclick="evalScript()"/>