Hi.

Maybe someone could help me figure out if this is a bug or just me using the TreeRowReference object wrong.

Scenario:
When running the .free() method on a valid TreeRowReferance I get this error message:


(myapp.py:14436): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_object_get_data): assertion `G_IS_OBJECT (object)' failed
./myapp.py:294: GtkWarning: gtktreemodel.c:1943: bad row reference, proxy has no outstanding row references
self._currentItem = gtk.TreeRowReference(self._model, path)



(This code is supposed to unset the bold flag on the row that the RowReference is pointing to now, free the reference and create a new one pointing at some other row.)


CodeBlock:
...
if self._currentItem != None:
  if self._currentItem.valid():
    lastItemIter = self._model.get_iter(self._currentItem.get_path())
    self._model.set_value(lastItemIter, self.IDX_BOLDSET, False)
    self._currentItem.free()
        
self._currentItem = gtk.TreeRowReference(self._model, path)
...
(Indentation length have been altered to fit into the mail (4 -> 2)


The traceback mentions the "self._currentItem = gtk.Tree..."-line as the problem here, but if I comment out the "self._currentItem.free()"-line all works as it should without warnings.


So, is this a bug or am I just using the free() method all wrong?

VersionNumbers and such:
pygtk: 2.4.1
gtk+: 2.4.13
(all running in a Gentoo Linux environment)
_______________________________________________
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