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?
The GenericTreeModel class has a number of limitations (you just ran
into some). For 0.99.5, you probably can't do what you want. Note that
GenericTreeModel will leak lots of references (and can't really be fixed).
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk