X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=XObjectBase%2FGtkListStore.js;h=d33142f4b87c9f90f3b782fa9cef07c5e61e4c3c;hb=507e44b9f9eaf3d5bda7ba290a9cbef1a46b51d7;hp=6833e1e84668d42eb17dba701abde825ccb901eb;hpb=88e4a884771465f73a64938c7e1522b23ce600bd;p=app.Builder.js diff --git a/XObjectBase/GtkListStore.js b/XObjectBase/GtkListStore.js index 6833e1e84..d33142f4b 100644 --- a/XObjectBase/GtkListStore.js +++ b/XObjectBase/GtkListStore.js @@ -45,24 +45,28 @@ GtkListStore = XObject.define( // not very type safe... var tpath = path; if (typeof(path) == 'string' ) { - tpath = new Gtk.TreePath.c_new(string); + tpath = new Gtk.TreePath.from_string(path); } var iter = new Gtk.TreeIter(); this.el.get_iter (iter, tpath) ; - var gval = new GObject.Value(''); - this.el.get_value( iter, col, gval) + 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) { var tpath = path; if (typeof(path) == 'string' ) { - tpath = new Gtk.TreePath.from_string(string); + tpath = new Gtk.TreePath.from_string(path); } var iter = new Gtk.TreeIter(); this.el.get_iter (iter, tpath) ; - this.el.set_value(iter,i,values[i]); + this.el.set_value(iter,col,val); }