Fabrizio Pollastri escribió:
I am trying to emulate a keyboard with gtk buttons to entry some text
into a gtk.Entry. All works fine, but I get the following errors.
(myprogram.py:2165): Gdk-CRITICAL **: gdk_drawable_get_display:
assertion `GDK_IS_DRAWABLE (drawable)' failed
(myprogram.py:2165): Gdk-CRITICAL **: gdk_keymap_get_for_display:
assertion `GDK_IS_DISPLAY (display)' failed
I try to guess here, but you probably have this problem due to the
key_press event being generated before the gtk+ loop is started and the
needed resources have been allocated. I can imagine gtk+ tries to
determine from which display and drawable the event is generated, and it
can't succeed for the former reasons.
I'd try to do the event generation after the window has been realized
using an on_realize callback for it (maybe the configure stage is enough
for the job too).
Good luck,
Rafael Villar Burke
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/