Benjamin Montgomery wrote:
I need some help with TreeStore.  I'm trying to add an object that is
part of a module that I have written in C.  In my pygtk app I'm using:

gtk.TreeStore(gtk.TYPE_STRING, ..., myobject)

When this line gets executed, I get the error:

TypeError: could not get typecode from object

Does anyone know what I would need to add to my object to be able to put
it in to a treestore?

If it is a Python object and not a PyGTK GObject then use gobject.TYPE_PYOBJECT as the column type. gobject.TYPE_PYOBJECT will also work for PyGTK GObjects as well.

You might want to file a bug since I figure that TreeStore and ListStore should be able to accept an ordinary Python object as well.

John
_______________________________________________
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