On Sun, 2004-04-25 at 20:17, John Finlay wrote: > >If I modify the treemodel.py file from: > > > > model = MyTreeModel() > > > >to: > > > > model = MyTreeModel().filter_new(0) > > > This creates a model starting from the virtual root of zero i.e. the > tree only contains the children of node 0. Pass it None or leave it out > to use all the nodes. That doesn't work with your example because it > doesn't follow the treemodel interface - iter_n_children should handle > node=None as meaning retrieve the number of toplevel nodes:
The problem is that filter_new() requires a parameter, and will not take None. self.sort_model = gtk.TreeModelSort(self.person_model).filter_new() TypeError: GtkTreeModel.filter_new() takes exactly 1 argument (0 given) self.sort_model = gtk.TreeModelSort(self.person_model).filter_new(None) TypeError: could not convert root to a GtkTreePath 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/
