Builder4/Editor.bjs.HEAHMX
authorAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 07:46:47 +0000 (15:46 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 07:46:47 +0000 (15:46 +0800)
Builder4/Editor.bjs
Builder4/Editor.vala

Builder4/Editor.bjs
Builder4/Editor.vala

index 392b769..3b16502 100644 (file)
@@ -7,7 +7,6 @@
     "modOrder" : "",
     "items" : [
         {
-            "JsRender.JsRender file" : "null",
             "# string activeEditor" : "\"\"",
             "|   bool saveContents" : "  ()  {\n    \n    \n    \n    \n    \n    \n    \n   \n     \n     var str = _this.buffer.toString();\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" : "",
@@ -17,6 +16,7 @@
             "* pack" : "add",
             "xtype" : "VBox",
             "|   void show" : "(JsRender.JsRender file, JsRender.Node node, string ptype, string key)\n{\n    this.ptype = ptype;\n    this.key  = key;\n    this.node = node;\n    this.file = file;\n    \n   string val = \"\";\n    // find the text for the node..\n    if (ptype == \"listener\") {\n        val = node.listeners.get(key);\n    \n    } else {\n        val = node.props.get(key);\n    }\n    this.view.load(val);\n    this.key_edit.el.text = key;    \n\n}",
+            "# JsRender.JsRender file" : "null",
             "# bool pos" : false,
             "string id" : "Editor",
             "# bool dirty" : false,
index b6e6963..bb94f49 100644 (file)
@@ -19,12 +19,12 @@ public class Editor : Object
     public Xcls_buffer buffer;
 
         // my vars (def)
-    public JsRender.JsRender file;
     public string activeEditor;
     public int pos_root_x;
     public int pos_root_y;
     public string ptype;
     public string key;
+    public JsRender.JsRender file;
     public bool pos;
     public bool dirty;
     public signal void save ();
@@ -37,10 +37,10 @@ public class Editor : Object
         this.el = new Gtk.VBox( false, 0 );
 
         // my vars (dec)
-        this.file = null;
         this.activeEditor = "";
         this.ptype = "";
         this.key = "";
+        this.file = null;
         this.pos = false;
         this.dirty = false;
         this.node = null;