resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / DialogPluginWebkit.vala
index 96ea249..e4c46f4 100644 (file)
@@ -153,14 +153,19 @@ public class Xcls_DialogPluginWebkit : Object
              if (response_id == 1) { // OK...
                  var loop = new MainLoop();
                  // run toBJS to get the data... (calls back into alert handler)
-                   this.webview.el.run_javascript.begin("Editor." + cls + ".panel.toBJS();", null, (obj, res) => {
-    
-                     this.webview.el.run_javascript.end(res);
-    
-                        loop.quit();
-                    });
-                 loop.run();
-                 ret = _this.result_json;
+                    _this.result_json = "";
+                     this.webview.el.run_javascript.begin("Editor." + cls + ".panel.toBJS();", null, (obj, res) => {
+                         try {
+                            this.webview.el.run_javascript.end(res);
+                        } catch(Error e) {
+                    
+                         }
+                         loop.quit();
+                     });
+                     loop.run();
+                     ret = _this.result_json;
+                     
+                 
         //           print("LOOP END?");
                  // try and get the resopse...
                 break;