On Thu, 30 Oct 2003 19:13:48 +0000, Gustavo J. A. M. Carneiro wrote
> A Qui, 2003-10-30 �s 18:30, Fernando San Martin W. escreveu:
> > hello:
> >
> > i'm runnig this code:
> >
> > m = unicode(mensaje, 'latin-1')
> >
> > dialog = gtk.MessageDialog(window, gtk.DIALOG_MODAL |
> > gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
> > m.encode('utf-8'))
> >
> > dialog.run()
> > dialog.destroy()
>
> I tried running this code, except that I replaced 'window' for
> None, since I don't have a parent window to test with. It ran
> without any problems. Could be a problem with your pygtk
> installation, perhaps...
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
the call is like this
def on_txtFolioComprobante_key_press_event(self, entry, event):
if event.keyval == gtk.keysyms.F1:
...
self.aviso(self.padre.ctb_frm_main,sys.exc_info()[1])
return
def aviso(self, window, mensaje):
"""una simple caja para avisar cosillas"""
m = unicode(mensaje, 'latin-1')
dialog = gtk.MessageDialog(window, gtk.DIALOG_MODAL |
gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
m.encode('utf-8'))
dialog.run()
dialog.destroy()
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/