On Tue, Jul 15, 2003 at 04:02:04PM +0200, Thomas Hunger wrote: > void > insert_text_handler (GtkEditable *editable, > const gchar *text, > gint length, > gint *position, > gpointer data) > > When I do this in python, the position argument is (print position): > <gpointer at 0xbfffe298>
I thought it was a bug; I would expect it should be an int. However, in PyGTK 0.6: >>> t = gtk.GtkText() >>> t.set_editable(1) >>> def foo(*args): ... print args ... >>> t.connect("insert_text", foo) 10 When I keypress, I get back the following tuple: ( <gtk.GtkText instance at 0x824f0f4>, 'a\x8a\x13\x08G"[EMAIL PROTECTED]/@[EMAIL PROTECTED]/@[EMAIL PROTECTED]/@[EMAIL PROTECTED]', 1, <PyCObject object at 0x824ee50> ) Which is (widget, text, length, something) (no data is provided because I didn't connect with data). Ignore the bizarre text buffer, and you have the same sort of weird return value that you are getting. James? Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/