Builder4/DialogConfirm.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 10:29:20 +0000 (18:29 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 10:29:20 +0000 (18:29 +0800)
Builder4/DialogConfirm.js
Builder4/DialogConfirm.vala

Builder4/DialogConfirm.bjs
Builder4/DialogConfirm.js
Builder4/DialogConfirm.vala

index fb3b528..bdb2e57 100644 (file)
@@ -7,8 +7,8 @@
     "items": [
         {
             "listeners": {
-                "response": "function (self, response_id) {\n   this.el.hide();\n     print(\"RESPOSE: \" + response_id);\n    if (response_id == -8) { //yes!\n   print(\"CALL SUCCES?\")\n    this.success(); //  fixme a delegate\n    }\n}\n/*--\n ( response_id) =>  {\n   this.el.hide();\n    //print(\"RESPOSE: \" + response_id);\n    if (response_id == -8) { //yes!\n           print(\"CALL SUCCES?\");\n      // this.success();\n    }\n\n\n}\n*/",
-                "delete_event": "function (self, event) {\n    this.el.hide();\n    return true;\n}\n/*--\n(event) => {\n    this.el.hide();\n    return true;\n}\n*/\n\n\n"
+                "response": " ( response_id) =>  {\n   this.el.hide();\n    //print(\"RESPOSE: \" + response_id);\n    if (response_id == -8) { //yes!\n           print(\"CALL SUCCES?\");\n      // this.success();\n    }\n\n\n}\n ",
+                "delete_event": " (event) => {\n    this.el.hide();\n    return true;\n}\n \n\n\n"
             },
             "text": "Tests",
             "title": "Please Confirm d",
index 3ef2872..7a59e71 100644 (file)
@@ -12,16 +12,7 @@ XObject = imports.XObject.XObject;
 DialogConfirm=new XObject({
     xtype: Gtk.MessageDialog,
     listeners : {
-        response : function (self, response_id) {
-           this.el.hide();
-             print("RESPOSE: " + response_id);
-            if (response_id == -8) { //yes!
-           print("CALL SUCCES?")
-            this.success(); //  fixme a delegate
-            }
-        }
-        /*--
-         ( response_id) =>  {
+        response : ( response_id) =>  {
            this.el.hide();
             //print("RESPOSE: " + response_id);
             if (response_id == -8) { //yes!
@@ -30,18 +21,11 @@ DialogConfirm=new XObject({
             }
         
         
-        }
-        */,
-        delete_event : function (self, event) {
-            this.el.hide();
-            return true;
-        }
-        /*--
-        (event) => {
+        },
+        delete_event : (event) => {
             this.el.hide();
             return true;
         }
-        */
     },
     text : "Tests",
     title : "Please Confirm d",
index cebc42d..ed95d92 100644 (file)
@@ -43,17 +43,19 @@ public class Xcls_MessageDialog1
         this.el.response.connect(  ( response_id) =>  {
            this.el.hide();
             //print("RESPOSE: " + response_id);
-            if (response_id == -8) { //yes!
+            if (response_id == -8) => { //yes!
                    print("CALL SUCCES?");
               // this.success();
             }
         
         
-        } );
-        this.el.delete_event.connect( (event) => {
+        }
+          );
+        this.el.delete_event.connect(  (event) => {
             this.el.hide();
             return true;
-        } );
+        }
+          );
     }
 
     // userdefined functions 
@@ -71,20 +73,14 @@ public class Xcls_MessageDialog1
     // skip |message_type - already used 
 
     // skip |modal - already used 
-    public void show(string msg) {
-             //if (!this.el) { this.init(); } 
-             //this.success = success;
-            this.el.text =  msg;
-            this.el.show_all();
-        
-        }
-    public void show_all() {
-            this.show("test");
-        }
+
+    // skip |show - no return type
+
+    // skip |show_all - no return type
 
     // skip |use_markup - already used 
 
-    // skip |xns - could not find seperator
+    // skip |xns - no return type
 
     // skip xvala_cls - not pipe