On Thu, 30 Oct 2003 21:22:13 -0200, Christian Robottom Reis wrote
> On Thu, Oct 30, 2003 at 03:40:11PM -0400, Fernando San Martin W. wrote:
> > i tested in some diferents machines and i have the same problem, this code is
> > executed by key_press_event on an gtk.entry to advice if something is wrong
> > with the data entered in the entry
>
> Can you try to produce a minimal testcase so we can reproduce the
> problem? Makes it a lot easier to verify and fix if it's a bug in the
> current release.
i try this:
import gobject
import gtk
from gtk import TRUE, FALSE
def mainwin():
def advice():
m = unicode("Atenci�n", 'latin-1')
dialog = gtk.MessageDialog(w, gtk.DIALOG_MODAL |
gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
m.encode('utf-8'))
dialog.run()
dialog.destroy()
def on_entry_key_press_cb(entry, event):
if event.keyval == gtk.keysyms.F1:
advice()
def on_entry_focus_out_cb(entry, event):
advice()
return FALSE
w = gtk.Window()
w.connect('destroy', lambda w: gtk.main_quit())
w.set_title('Core Test')
v = gtk.VBox()
w.add(v)
e = gtk.Entry()
e.add_events(gtk.gdk.KEY_PRESS_MASK)
e.connect('key-press-event', on_entry_key_press_cb)
e.connect('focus-out-event', on_entry_focus_out_cb)
v.pack_start(e)
b = gtk.Button("Quit")
v.pack_start(b)
w.show_all()
mainwin()
gtk.mainloop()
when the entry widget lost_focus, the messagebox it's showed, but after little
delay all crash...
take care
Fernando San Mart�n Woerner counter.li.org
Jefe Departamento Inform�tica #216550
Galilea S.A. Talca
2 Norte 965 - Fono/Fax: 56-71-224876 Chile
"Soy due�o de las palabras que guardo, y prisionero de las que digo."
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/