Re: Casting GTKWidgets - Urgent
- From: Naheed Vora <nv linuxstart com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Casting GTKWidgets - Urgent
- Date: Tue, 03 Oct 2000 01:17:51 +0530
I got it....
Just the user_data drived me on the wrong path.... Anyway, now it works
just fine...
Thankyou,
Naheed
Iain wrote:
I am quoting this from gtk manual which deals with the callback
function. It clearly states that the second argument is what the
userinputs in the text_entry, which actually I want to catch...
void enter_callback( GtkWidget *widget,
GtkWidget *entry )
{
gchar *entry_text;
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
printf("Entry contents: %s\n", entry_text);
}
The changed signal on GtkEditable is like this
void enter_callback (GtkEditable *editable,
gpointer user_data);
User_data is whatever you specified as the last argument to
gtk_signal_connect.
your function should be
void enter_callback (GtkEditable *editable,
gpointer user_data)
{
gchar *entry_text;
entry_text = gtk_entry_get_text (GTK_ENTRY (editable));
printf("Entry contents: %s\n", entry_text);
}
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]