src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 21 May 2015 06:56:37 +0000 (14:56 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 May 2015 06:56:37 +0000 (14:56 +0800)
src/Builder4/Editor.vala

src/Builder4/Editor.bjs
src/Builder4/Editor.vala

index ae7839b..408f5a0 100644 (file)
@@ -12,6 +12,7 @@
    "# string activeEditor" : "\"\"",
    "|   bool saveContents" : "  ()  {\n    \n    \n    \n    \n    \n    \n    \n   \n     \n     var str = _this.buffer.toString();\n     \n      \n     \n     \n     if (!_this.buffer.checkSyntax()) {\n         print(\"check syntax failed\");\n         //this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n         //return false;\n     }\n     \n     // LeftPanel.model.changed(  str , false);\n     _this.dirty = false;\n     _this.save_button.el.sensitive = false;\n     \n     \n        \n     \n    // find the text for the node..\n    if (ptype == \"listener\") {\n        this.node.listeners.set(key,str);\n    \n    } else {\n         this.node.props.set(key,str);\n    }\n\n     \n    \n    // call the signal..\n    this.save();\n    \n    return true;\n\n} ",
    "# int pos_root_x" : "",
+   "* init" : "{\n    this.fname = \"\";\n}\n",
    "# int pos_root_y" : "",
    "# string ptype" : "\"\"",
    "bool expand" : true,
index 8498ca0..a40f1de 100644 (file)
@@ -57,6 +57,12 @@ public class Editor : Object
         var child_1 = new Xcls_RightEditor( _this );
         child_1.ref();
         this.el.pack_end (  child_1.el , true,true );
+
+        // init method
+
+        {
+            this.fname = "";
+        }
     }
 
     // user defined functions