Ralph Walden wrote: >Christian Reis wrote: > > > >>On a related note, has anybody noticed that the text parameter to >>insert_text will include random garbage beyond the length send in? Is >>this by design, James? >> >> >> > >I have also noticed this. I work with Irix and with HPUX, and I only >see this on HPUX. I figured there was a bug somewhere. The workaround >is, of course, > > def on_insert_text(widget,text,len,*args): > text = text[0:len] > > This is not a bug I can correct for (easily). Gtk claims that the text argument to the signal is a G_TYPE_STRING argument, which is accepted to mean "standard NUL terminated C string" everywhere else in gtk+. This is the one handler where they are using G_TYPE_STRING with a non NUL terminated string, so things go weird.
James. -- Email: [EMAIL PROTECTED] | Linux.conf.au 2003 Call for Papers out WWW: http://www.daa.com.au/~james/ | http://conf.linux.org.au/cfp.html _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
