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

Builder4/DialogNewComponent.bjs
Builder4/DialogNewComponent.js
Builder4/DialogNewComponent.vala

index 28b8828..d5c5b89 100644 (file)
@@ -18,7 +18,7 @@
             "xtype": "Dialog",
             "|deletable": "false",
             "|modal": "true",
-            "|show": "function (c) \n{\n    this.project = c.project;\n    if (!this.el) {\n        this.init();\n    }\n    this.def =  { \n        name : '' , \n        title : '' ,\n        region : '' ,\n        parent: '',\n      //  disable: '',\n        modOrder : '0',\n        permname : ''\n    };\n    for (var i in this.def) {\n        c[i] = c[i] || this.def[i];\n        this.get(i).el.set_text(c[i]);\n    }\n    if (c.name) {\n        this.el.set_title(\"Edit File Details - \" + c.name);\n    } else {\n        this.el.set_title(\"Create New File\");\n    }\n     \n    this.file = c;\n    console.log('show all');\n    this.el.show_all();\n    this.success = c.success;\n    \n    \n}",
+            "|void:show": "function (c) \n{\n    this.project = c.project;\n    if (!this.el) {\n        this.init();\n    }\n    this.def =  { \n        name : '' , \n        title : '' ,\n        region : '' ,\n        parent: '',\n      //  disable: '',\n        modOrder : '0',\n        permname : ''\n    };\n    for (var i in this.def) {\n        c[i] = c[i] || this.def[i];\n        this.get(i).el.set_text(c[i]);\n    }\n    if (c.name) {\n        this.el.set_title(\"Edit File Details - \" + c.name);\n    } else {\n        this.el.set_title(\"Create New File\");\n    }\n     \n    this.file = c;\n    console.log('show all');\n    this.el.show_all();\n    this.success = c.success;\n    \n    \n}",
             "|xns": "Gtk",
             "items": [
                 {
index c95e1fb..d70a583 100644 (file)
@@ -92,7 +92,7 @@ DialogNewComponent=new XObject({
     title : "New Component",
     deletable : false,
     modal : true,
-    show : function (c) 
+    'void:show' : function (c) 
     {
         this.project = c.project;
         if (!this.el) {
index 16914bc..27d9a9d 100644 (file)
@@ -148,8 +148,38 @@ public class Xcls_DialogNewComponent
     // skip |deletable - already used 
 
     // skip |modal - already used 
-
-    // skip |show - no return type
+    public void showfunction (c) 
+        {
+            this.project = c.project;
+            if (!this.el) {
+                this.init();
+            }
+            this.def =  { 
+                name : '' , 
+                title : '' ,
+                region : '' ,
+                parent: '',
+              //  disable: '',
+                modOrder : '0',
+                permname : ''
+            };
+            for (var i in this.def) {
+                c[i] = c[i] || this.def[i];
+                this.get(i).el.set_text(c[i]);
+            }
+            if (c.name) {
+                this.el.set_title("Edit File Details - " + c.name);
+            } else {
+                this.el.set_title("Create New File");
+            }
+             
+            this.file = c;
+            console.log('show all');
+            this.el.show_all();
+            this.success = c.success;
+            
+            
+        }
 
     // skip |xns - no return type