[pygtk] PyGobject TreeModel selection bug?
Brent S. Elmer Ph.D.
webe3vt at aim.com
Tue Jun 4 22:16:01 WST 2013
> The problem is the selected_foreach loop here. I'm pretty sure the
> issue is there's a discrepency between the references created by gtk
> and the python object references in this code path, so you end up with
> a path that references something gtk has dropped it's references to.
>
> This is probably a PyGobject bug, but I'm not sure of all the details,
> so there may be a reason for the current behaviour.
>
> You can avoid the issue by either expliticly copying the path in your
> selection_callback function - i.e, using pathlist.append(path.copy()),
> or by using the treeselection's get_selected_rows method.
>
Thanks for the help. Here is my modified code that works. I used
treeselections's get_selected_rows.
Brent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gi_test3.py
Type: text/x-python
Size: 5137 bytes
Desc: not available
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20130604/885a17dd/attachment.py>
More information about the pygtk
mailing list