On Mon, Oct 20, 2003 at 01:50:39PM -0600, Don Allingham wrote:I hope I'm doing this the correct way :-) I've taken the treemodel.py file from the pytk examples. This example displays a set of tuples in a tree. From what I understand, to make this a sortable model, I create a new model using gtk.TreeModelSort(), and pass it the original model as a parameter. I then use the new model the way I would use the original.
I may be misunderstanding this. I took the treemodel.py example from the pygtk distribution and changed it from:
model = MyTreeModel() tree_view = gtk.TreeView(model)
To:
model = MyTreeModel() sort_model = gtk.TreeModelSort(model) tree_view = gtk.TreeView(sort_model)
When I run it, I get:
** (treemodel.py:16851): CRITICAL **: file pygtktreemodel.c: line 499 (pygtk_generic_tree_model_iter_n_children): assertion `iter != NULL' failed
(treemodel.py:16851): Gtk-CRITICAL **: file gtktreemodelsort.c: line 2146 (gtk_tree_model_sort_build_level): assertion `length > 0' failed
Strange exceptions look like they're being triggered by an empty model -- are you sure you're doing this the right way? :-)
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
If I run the original treemodel.py, it functions properly. If I make the modifications above to create sortable model from the original, I get the error messages, and it no longer functions.
Don
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
