Sorting a GtkTree?
- From: Thomas Ugland <killer lothlorien no>
- To: gtk-app-devel-list gnome org
- Subject: Sorting a GtkTree?
- Date: 14 Jul 2002 03:37:13 +0200
Hey.
I'm creating a database program with a GtkTree wich lists
the data from the database.
Now I'm trying to get the list sorted, and added
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), 1,
GTK_SORT_ASCENDING);
store is a GtkTreeStore, with a few columns in it.
And initially it all seems to work.
but when I try to add new entries to the GtkTreeStore later on in the
program, the TreeView just 'locks' up, and the select cursor wont move.
Then it all crashes with:
(db:862): Gtk-CRITICAL **: file gtktreestore.c: line 617
(gtk_tree_store_get_value): assertion `iter->stamp == GTK_TREE_STORE
(tree_model)->stamp' failed
(db:862): GLib-GObject-WARNING **: gtype.c:2836: type id `0' is invalid
(db:862): GLib-GObject-WARNING **: can't peek value table for type
`<invalid>' which is not currently referenced
Segmentation fault (core dumped)
--
gdb/bt:
#0 0x281e5169 in gtk_tree_model_get_valist () from
/usr/X11R6/lib/libgtk-x11-2.0.so.0
#1 0x281e4ffc in gtk_tree_model_get () from
/usr/X11R6/lib/libgtk-x11-2.0.so.0
#2 0x0804b5e1 in data_edit (tree=0x8063e80) at data.c:109
Is this just a stupid pilot error, with me going at it the
wrong way?
(It all works perfectly when I remove the
gtk_tree_sortable_set_sort_column_id(); )
--
Thomas Ugland
-> If everything is coming your way then you're in the wrong lane. <-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]