[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Casting GtkWidgets
void
on_combo_entry1_activate (GtkEditable *editable,
gpointer user_data)
{
GtkWidget *text_entry = user_data;
char *string = gtk_entry_get_text(GTK_ENTRY (text_entry));
g_print(string);
}
Error encountered :-
----------------------------------------------------------
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 496 (gtk_entry_get_text):
assertion `entry != NULL' failed.
GLib-CRITICAL **: file gmessages.c: line 645 (g_print): assertion
`format != NULL' failed.
----------------------------------------------------------
Please guide me how can I cast the gpointer into char* which is recieved
from signal caused by Gtk_entry widget.
TIA
nv