Gustavo J. A. M. Carneiro wrote:

 You should try keeping your tree model intact, then create a
gtk.TreeModelSort object, wrapping your model, then use the
gtk.TreeModelSort as model for the tree view.  See this:

http://www.moeraki.com/pygtkreference/pygtk2reference/class-gtktreemodelsort.html




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

And the test case now fails to work.

Don Allingham



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to