resources/RooUsage.txt
[app.Builder.js] / src / JsRender / NodeToGtk.vala
index 650c97f..613b363 100644 (file)
@@ -189,16 +189,22 @@ public class JsRender.NodeToGtk : Object {
                                        if (rv_s.length > 0) {
                                                raw_val = rv_s[rv_s.length-1];                                  
                                                EnumClass ec = (EnumClass) vt.class_ref ();
+                                               var foundit = false;
                                                for (var i =0;i< ec.n_values; i++) {
-                                                       var ev = ec.values[i].value_ame;
+                                                       var ev = ec.values[i].value_name;
                                                        var ev_s= ev.split("_");
                                                        if (raw_val == ev_s[ev_s.length-1]) {
                                                                var sval = GLib.Value(typeof(int));
                                                                sval.set_int(ec.values[i].value);
                                                                ret.set_property(k, sval);
-                                                               continue;
+                                                               foundit = true;
+                                                               break;
                                                        }
                                                }
+                                               if (foundit) {
+                                                       continue;
+                                               }
+                                                       
                                        }
                                }
                        }
@@ -274,13 +280,12 @@ public class JsRender.NodeToGtk : Object {
                        }
                        labels.add(this.children.get(i));
                }
-               for (var i = 0; i < bodies.size; i++) { 
+               for (var i = 0; i < bodies.size; i++) {
+                       var lbl = (i > (labels.size -1)) ? null : labels.get(i);
+
                        ((global::Gtk.Notebook)this.wrapped_object).append_page(
                                 (global::Gtk.Notebook) bodies.get(i).wrapped_object,
-                                (labels.size > i - 1) ? 
-                                       (global::Gtk.Notebook) labels.get(i).wrapped_object :
-                                       null
-                                       
+                                lbl != null ?  (global::Gtk.Notebook) lbl.wrapped_object : null
                        );
                        
                        
@@ -450,15 +455,18 @@ public class JsRender.NodeToGtk : Object {
                var ns = this.parentObj.node.fqn().split(".")[0];
                 
                var pack = this.node.props.get("* pack").split(",");
-
-       
+               
+               // this tries to use the parameter names from the '*pack' function as properties in child_set_property.
+           // for a grid it's trying to do left/top/width/height.
+           
+           
                if (cls_methods.has_key(pack[0])) {
                        var mparams = cls_methods.get(pack[0]).paramset.params;
                        for (var i = 1; i < mparams.size; i++ ) {
                                if (i > (pack.length -1)) {
                                        continue;
                                }
-                       
+                               Palete.Gir.checkParamOverride(mparams.get(i));
                                var k = mparams.get(i).name;
 
                                Value cur_val;