[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile-gtk: problem in "insert-text" signal handling.

From: Daniel Skarda
Subject: Re: guile-gtk: problem in "insert-text" signal handling.
Date: Sun, 16 Mar 2003 09:31:56 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/20.7


> with the following program, I am getting garbage from the "new-text" variable,
> when introducing the second and following characters...
> Is this a bug in guile-gtk-1.2-0.31, or am I only supposed to use the first
> charachter of the string?

  I think you found a (design) bug in Gtk+ - string received by signal handler
is not terminated by '\000', the length of the string is passed as an additional
argument. Unfortunately, any other signal does not use "STRING, LENGTH" pattern
for passing string parameters. The bug is also potential source of SIGSEGV (when
no random '\000' is found, which is quite unlikely - but hey, all hideous bugs
have unlikely conditions.... )

  Another sad part of the story: sgtk_callback_marshall does not now the signal
name, so all we can do now on guile-gtk part is an ugly hack:

   if (n_args == 3 && GTK_FUNDAMENTAL_TYPE (args[0]) == GTK_TYPE_STRING) && ...)
     /* let's hope we handle "new-text" signal.... */

  Please report the bug to Gtk+ folks.

Have a nice day,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]