[pygtk] help with TreeStore
Sandro Dentella
sandro at e-den.it
Sun Jun 11 16:40:22 WST 2006
On Sat, Jun 10, 2006 at 09:08:27PM -0500, Benjamin Montgomery wrote:
> On Sat, 2006-06-10 at 15:35 -0700, John Finlay wrote:
> > 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.
>
> gobject.TYPE_PYOBJECT works exactly as I wanted. I missed it since it
> isn't listed in the reference manual.
In some circumnstancies I have used 'object' directly. It seems to work
eather. Is it translated to gobject.TYPE_PYOBJECT internally? is it wrong to
use 'object'?
When storing number I have used 'int' but to find out that I was not allowed
to go back to change the value back to 'None' (TypeError: value is of the
wrong type for this column). Is there a way to set the value of a ListStore
to None in that case?
One last question. I have not found a way to query a ListoStore/TreeStore to
output which are its column definitions, so no way to create a inspector. Is
it possible?
Thanks
sandro
*:-)
--
Sandro Dentella *:-)
e-mail: sandro a e-den.it
http://www.tksql.org TkSQL Home page - My GPL work
More information about the pygtk
mailing list