src/JsRender/NodeToVala.vala
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 05:01:00 +0000 (13:01 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 05:01:00 +0000 (13:01 +0800)
src/JsRender/NodeToVala.vala

index 63156d6..96dc396 100644 (file)
@@ -345,22 +345,23 @@ public class JsRender.NodeToVala : Object {
        
                        // if id of child is '+' then it's a property of this..
                void addPlusProperties()
-       {
+               {
                        if (this.node.items.size < 1) {
-                         return;
-               }
-               var iter = this.node.items.list_iterator();
-               while (iter.next()) {
+                               return;
+                       }
+                       var iter = this.node.items.list_iterator();
+                       while (iter.next()) {
                        var ci = iter.get();
                                        
-                                       if (ci.xvala_id[0] != '+') {
-                                               continue; // skip generation of children?
-                                               
-                                       }
-                                       this.ret += this.pad + "public " + ci.xvala_xcls + " " + ci.xvala_id.substring(1) + ";\n";
-                                                          
+                               if (ci.xvala_id[0] != '+') {
+                                       continue; // skip generation of children?
                                        
                                }
+                               this.node.proplines.set(k, this.cur_line);
+                               this.addLine(this.pad + "public " + ci.xvala_xcls + " " + ci.xvala_id.substring(1) + ";");
+                                                  
+                               
+                       }
        }
 
        void addValaCtor()