Puzzling behavior when passing user data to callback from Glade
- From: dfg dfg <abxccd msn com>
- To: <gtk-app-devel-list gnome org>
- Subject: Puzzling behavior when passing user data to callback from Glade
- Date: Sun, 25 Apr 2010 09:16:39 +0000
Hi all,
I have a Glade interface with a button. I have defined a callback handler for the button and a user data that
is the name of a ListStore which is also created in Glade.
I then wrote a simple call back as follows:
void cb_test(GtkWidget *widget, GtkListStore *store){
GtkTreeIter iter;
gtk_list_store_append(GTK_LIST_STORE(store), &iter);
}
The code above does not work, unless I change it to:
void cb_test(GtkWidget *widget, GtkListStore *store){
GtkTreeIter iter;
gtk_list_store_append(GTK_LIST_STORE(widget), &iter);
}
How come the userdata is passed in as the first argument, while the button widget itself is passed in as the
second arguement?
Thank you :)
_________________________________________________________________
Live connected. Get Hotmail & Messenger on your phone.
http://go.microsoft.com/?linkid=9724462
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]