Looks like there is something wrong:

>>> p.enum_class.__enum_values__[0].value_name
'GDK_GRAVITY_NORTH_WEST'
>>> [ctrl+Z]

python: Modules/gcmodule.c:231: visit_decref: La declaraci�n
`gc->gc.gc_refs != 0' no se cumple.
Abortado

which means:

python: Modules/gcmodule.c:231: visit_decref: The declaration
`gc->gc.gc_refs != 0' is not true.
Aborted


Lorenzo


El dom, 18-07-2004 a las 21:33, Johan Dahlin escribi�:
> > But how do I know the string 'GTK_WINDOW_TOPLEVEL' from that value?
> > Should I use prop.__str__().split()[1]? Given a string
> > 'GTK_WINDOW_TOPLEVEL' I guess I can loop through all the __enum_values__
> > until I found the correct enum.
> 
> I fixed so you can now do:
> 
> enum.value_name or enum.value_nick for the nick
> 
> It's slightly more complex for flags, but you have all the necessary
> information in:
> 
> flags.value_names and flags_value_nicks
> 
> > choices = enum_spec.__enum_values__
> > 
> > [same thing for the flags]
> 
> enum_spec.enum_class.__enum_values__
> 
> and 
> 
> flags_spec.flags_class.__flags_values__
> 
> should work now.

_______________________________________________
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