Problems with "changed" signal on GtkTextBuffer(Win32)



Hi!

I am using latest Win32 version of the GTK (gtk+-2.4.7, glib-2.4.5)
downloaded from http://www.gimp.org/~tml/gimp/win32/
and I am having following problem.

Code below does not seem to work:
----------------------------------------------------------------------------
--
void on_textview_edited( GtkTextBuffer *, gpointer data );

 GtkTextBuffer *buffer = gtk_text_buffer_new (NULL);
GtkWidget *textview1 = gtk_text_view_new_with_buffer (buffer);
 gtk_signal_connect (GTK_OBJECT (buffer), "changed",
G_CALLBACK(on_textview_edited),  NULL);
----------------------------------------------------------------------------
--

On execution console is opened with warnings below, and callback is never
called back on buffer changes:

GLib-GObject-WARNING **: invalid cast from 'GtkTextBuffer' to 'GtkObject'
Gtk-CRITICAL **: file gtksignal.c: line 144 (gtk_signal_connect_full):
assertion 'GTK_IS_OBJECT (object)' failed

Anyone has a clue what might be wrong here ?

Thanks,
   Miroslav Rajcic





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