On Wed, 2003-01-29 at 17:24, Roberto Cavada wrote:
> I need to retrieve sensitive state of a widget.
> FAQ states I can use the get_state() method, but unfortunately I could
> not find any trace about that method, in my pygtk installation.
>
> >>> import gtk
> >>> w = gtk.Window()
> >>> w.get_state()
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> AttributeError: 'gtk.Window' object has no attribute 'get_state'
>
Try simply this:
w.state
Apparently, there is a set_state() method, but no get_state(), only
the 'state' attribute. IMHO, this makes sense, since getting an
attribute has no side effects, so it can be a simple field; setting
attributes should be done with set_xxx() functions, since there can be
side effects.
> Probably this is due to my configuration, pygtk is 1.99.14.
>
> About get_state(), code generator produces only the following warning
> during the building phase. This does not seem connected to the
> problem, though:
>
> > Could not write method GdkEvent.get_state: No ArgType for
> GdkModifierType*
>
> Sorry to bother you all with that, but maybe you can figure out what
> happens here.
>
> rob
>
> _______________________________________________
> pygtk mailing list [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
--
Gustavo Jo�o Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/