XObjectBase/GtkListStore.js
[app.Builder.js] / XObjectBase / GtkListStore.js
index 548089c..d33142f 100644 (file)
@@ -42,15 +42,31 @@ GtkListStore = XObject.define(
         },
         getValue  : function ( path, col)
         {
+            // not very type safe...
+            var tpath = path;
+            if (typeof(path) == 'string' ) {
+                tpath = new Gtk.TreePath.from_string(path);
+            }
+            
             var iter = new Gtk.TreeIter();
-            this.el.get_iter (iter, path) ;
-            var gval = new GObject.Value('');
-            this.el.get_value( iter, col, gval)
+            this.el.get_iter (iter, tpath) ;
+            print(GObject.type_name_from_instance(iter));
+            //print(XObject.type(iter));
+            
+            var gval = new GObject.Value(  [this.el.get_column_type(col), null ]);
+            this.el.get_value( iter, col, gval);
+            print("GET VALUE RETURNED: " + gval.value);
             return gval.value;
         },
         setValue  : function ( path, col, val)
         {
-            //this.el.set_value(iter,i,values[i]);
+            var tpath = path;
+            if (typeof(path) == 'string' ) {
+                tpath = new Gtk.TreePath.from_string(path);
+            }
+            var iter = new Gtk.TreeIter();
+            this.el.get_iter (iter, tpath) ;
+            this.el.set_value(iter,col,val);
         }