append : function( values ) {
this.list.append(values);
},
- getValue : function ( path, col)
+ getValue : function ( path, col)
{
- return this.list.getValue(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, tpath) ;
+ var citer = new Gtk.TreeIter();
+ this.el.convert_iter_to_child_iter(citer, iter);
+
+ var gval = new GObject.Value( [this.list.el.get_column_type(col), null ]);
+ this.list.el.get_value( citer, col, gval);
+ print("GET VALUE RETURNED: " + gval.value);
+ return gval.value;
},
setValue : function ( path, col, val)
{
- this.list.setValue(path,col,val);
+ var tpath = path;
+ if (typeof(path) == 'string' ) {
+ tpath = new Gtk.TreePath.from_string(path);
+ }
+ var iter = new Gtk.TreeIter();
+ var citer = new Gtk.TreeIter();
+ this.el.get_iter (iter, tpath) ;
+ this.el.convert_iter_to_child_iter(citer, iter);
+
+ this.list.el.set_value(citer,col,val);
}