GtkTextBuffer and the insert-text signal
- From: Michael Terry <mterry fastmail fm>
- To: gtk-app-devel-list gnome org
- Subject: GtkTextBuffer and the insert-text signal
- Date: Wed, 19 Feb 2003 00:58:31 -0500
Hello. I am porting an application from GTK+ 1 to GTK+ 2. Of course,
one of the big issues is changing from GtkText to GtkTextView.
Unfortunately, I am having a problem with the "insert-text" signal. In
particular, it seems that some of the parameters to my callback function
are getting garbled along the way.
I register the callback using g_signal_connect (or
g_signal_connect_after -- both give same results) with the following
prototype:
void function (GtkTextBuffer *Buffer, GtkTextIter start, gchar *text,
gint size, gpointer data);
When it gets called, the GtkTextBuffer pointer is fine, as is the user
data. Unfortunately, the string, length, and iter are all garbage. I
can't determine why this is happening. No other callbacks are
registered that alter the GtkTextBuffer in any way (that I can find).
What are the possible reasons the parameters could be awry? Am I
changing the text before the callback is called? Am I using some API
call wrong?
This is with GTK+ 2.2.1.
Thanks for any help.
-Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]