[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

RE: Casting GtkWidgets



Based on the information in your email, it sounds like "user_data" is something
other than a gtkentry.  Could you post the gtk_signal_connect() function that
calls on_combo_entry1_activate() ?



				-- Stupid Genius

> ----------
> From: 	Naheed Vora[SMTP:nv@xxxxxxxxxxxxxx]
> Sent: 	Monday, October 02, 2000 9:42 AM
> To: 	linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
> Subject: 	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
> 
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>