On 03 Apr 2003 15:47:01 -0300
Johan Dahlin <[EMAIL PROTECTED]> wrote:

> tor 2003-04-03 klockan 15.40 skrev george young:
> > [pygtk-1.99.15, gtk+-2.2.1, python 2.3.a1, x86 linux]
> > I have used 
> >   ls = ListStore(str, str, str)
> > 
> > with success, but
> >   ls = ListStore(bool, str, str)
> > 
> > fails with a nasty, misleading "could not get typecode from object" in a
> > *subsequent* statement!  If I change "bool" to gobject.TYPE_BOOLEAN, it
> > works fine.  Eeek, this took me a long while to debug!  Are python type
> > objects like "str" and "bool" not supposed to be used here?  And why doesn't
> > the traceback point to the appropriate offending statement?
> 
> Are str, int, float, object etc working but not bool?
> I think it's because python 2.3a is not fully supported yet.
> 
> Could you please fill a bug against this in mozilla?
> 
> I think there is a better traceback in 1.99.16, have you tried it out?


I tried 1.99.16: error is reported immediately instead of one statement
later, but still fails -- str, float, and int are ok, just bool fails:

Python 2.3a1 (#1, Jan 19 2003, 18:26:47) 
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> ls=gtk.ListStore(int,str,float)
>>> x=3
>>> ls=gtk.ListStore(int,str,float,bool)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: could not get typecode from object

I'll file a bug in bugzilla.

-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
        -- Sherlock Holmes in "The Dying Detective"
_______________________________________________
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