The python implementation of a GtkTreeModel uses tuples as the iter. Build up the path to the new node (which is also a tuple which lists the nodes to get to the updated node), and pass it as both the path and the iter.
Cheers, Matt On Wed, Dec 05, 2001 at 10:14:33AM -0500, Robert Nikander wrote: > Hi, > > I am trying to use the new TreeModel/View stuff in the latest pygtk > (1.99.5). In short, I need to know how to 'notify' the view when my > model is updated. I have copied from the example that shows a class > that subclasses gtk.GenericTreeModel and overrides a bunch of on_* > methods. Now, my database gets updated and I want to signal the > attached tree-view. I tried: > > self.emit('row-inserted', new_iter, new_iter) > > but got: > > Traceback (most recent call last): > File "./gtktest.py", line 105, in change_tree > tree_model.add_row() > File "./gtktest.py", line 19, in add_row > self.emit('row-inserted', new_iter, new_iter) > TypeError: could not convert type tuple to GtkTreeIter required for > parameter 1 > > I tried subclassing TreeIter and got the NotImplemented exception. > > So, how are people using TreeModels? > > Thanks, > Rob > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk