Re: Trouble with callback for GtkEditable::insert_text signal.



On Mon, 27 Nov 2000, Archit Baweja wrote:

> 
> Hi
> 
> Following is the callback I used for catching the GtkEditable::insert_text
> signal. As you can see it simple prints what was reported to have been inserted
> into the GtkText widget. But it starts printing garbage after the first time.
> 
> void
> insert_cb (GtkEditable *w, const char *t, int l, int *p, gpointer d)
> {
> 	g_print (fp, "Text inserted: %s.\n", g_strdup (t));
> }
> 
> Am I missing something or.......i don't know? please help.

t is not '\0' terminated.

James.





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