Thanks for the hints Alan! I got the latest version of seed up and running, and I'm writing a standalone example to ease my tests, and unfortunately I'm getting stuck even earlier now :( Here is what I did, with my configuration: - Running Ubuntu 10.04, with GLib 2.24.1 and GTK 2.20.0. - Grabbed gobject-introspection 0.6.12 (tarball), compiled and installed it. - Grabbed Seed 2.31.1 (tarball), compiled (with --enable-debug) and installed it. - Grabbed the latest gir-repository (git), compiled and installed it. - Grabbed the latest seed-examples, gtktreeview.js works (although with some warnings). I'm attaching my standalone example (a simple TreeView populated with a TreeStore), along with the output I get when running it with --seed-debug=all, hoping that someone may point out what I'm doing wrong and how to fix it. Regards, Olivier On 2010-05-26, Alan Knowles <alan akbkhome com> wrote: > you may need a more recent build of seed to get get_cursor to work, or try using this gir > http://devel.akbkhome.com/seed/Gtk-2.0.gir > g-ir-compiler Gtk-2.0.gir -o /usr/lib/girepository-1.0/Gtk-2.0.typelib > > I suspect the version of seed you are using may not handle out args that well.. > > the api docs for it are here. > http://devel.akbkhome.com/seed/Gtk.TreeView.html > > If gir and seed are uptodate this should work, although I've not tested it. > print(tree.get_cursor().path.to_string()); > > This is the other way to get it.. > var iter = new Gtk.TreeIter(); > var selection = tree.get_selection(null, iter); > print(tree.get_model().get_path(iter).to_string()); > > Note if path is not set, then they will fail > check with view.get_selection().get_selected_rows(view.get_model()) to see how may rows are set.. > > There is alot of treeview code here to look at. > http://git.akbkhome.com/?p=app.Builder.js;a=blob;f=Builder/Window.js > > > Regards > Alan
Attachment:
test_treeview.js.txt
Description: application/javascript
** Message: [INVOCATION] seed-engine.c:502: Converting arg: file_name (0) of function path_get_dirname, exception is 0xbf998f0c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: path_get_dirname with 1 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: file_name (0) of function path_is_absolute, exception is 0xbf998f0c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: path_is_absolute with 1 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:599: Invoking method: get_current_dir with 0 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: args (0) of function build_filenamev, exception is 0xbf998f0c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: build_filenamev with 1 'in' arguments and 0 'out' arguments ** Message: [INITIALIZATION] seed-engine.c:211: Constructing object of type GtkWindow ** Message: [INITIALIZATION] seed-engine.c:211: Constructing object of type GtkTreeView ** Message: [INITIALIZATION] seed-engine.c:211: Constructing object of type GtkTreeStore ** Message: [INVOCATION] seed-engine.c:502: Converting arg: n_columns (0) of function set_column_types, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: types (1) of function set_column_types, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: set_column_types with 2 'in' arguments and 1 'out' arguments (seed:5900): Gtk-WARNING **: /build/buildd/gtk+2.0-2.20.0/gtk/gtktreestore.c:350: Invalid type (null) ** Message: [INVOCATION] seed-engine.c:502: Converting arg: model (0) of function set_model, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: set_model with 2 'in' arguments and 0 'out' arguments (seed:5900): GLib-GObject-CRITICAL **: g_value_type_transformable: assertion `G_TYPE_IS_VALUE (src_type)' failed ** Message: [INITIALIZATION] seed-engine.c:211: Constructing object of type GtkTreeViewColumn ** Message: [INITIALIZATION] seed-engine.c:211: Constructing object of type GtkCellRendererText ** Message: [INVOCATION] seed-engine.c:502: Converting arg: cell (0) of function pack_start, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: expand (1) of function pack_start, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: pack_start with 3 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: cell (0) of function add_attribute, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: attribute (1) of function add_attribute, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: column (2) of function add_attribute, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: add_attribute with 4 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: title (0) of function set_title, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: set_title with 2 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: column (0) of function append_column, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: append_column with 2 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: widget (0) of function add, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: add with 2 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:599: Invoking method: show_all with 1 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: width (0) of function resize, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: height (1) of function resize, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: resize with 3 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: iter (0) of function append, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: parent (1) of function append, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: append with 3 'in' arguments and 0 'out' arguments ** Message: [INVOCATION] seed-engine.c:502: Converting arg: iter (0) of function set_value, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: column (1) of function set_value, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:502: Converting arg: value (2) of function set_value, exception is 0xbf99929c ** Message: [INVOCATION] seed-engine.c:599: Invoking method: set_value with 4 'in' arguments and 0 'out' arguments (seed:5900): GLib-GObject-CRITICAL **: g_value_type_compatible: assertion `G_TYPE_IS_VALUE (dest_type)' failed (seed:5900): Gtk-WARNING **: /build/buildd/gtk+2.0-2.20.0/gtk/gtktreestore.c:765: Unable to convert from gchararray to (null) ** Message: [INVOCATION] seed-engine.c:599: Invoking method: main with 0 'in' arguments and 0 'out' arguments (seed:5900): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (seed:5900): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed (seed:5900): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (seed:5900): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed (seed:5900): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (seed:5900): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed ** Message: [INVOCATION] seed-engine.c:599: Invoking method: main_quit with 0 'in' arguments and 0 'out' arguments