[Glade-users] gtk_object_get_user_data returns null pointer



Hi everybody,

Sorry for the second post about this, but I'm really desperate :-(
The lookup_widget function seems not to work for me. I'm using libglade to
build my interface, and now I try to lookup the widget with that function.
If I add some print statements in end of the loop of the lookup_widget
function like 

g_print("%s ; parent: %s\n",gtk_widget_get_name(GTK_WIDGET(widget)),
gtk_widget_get_name(GTK_WIDGET(parent)));

then I get the following output:

btn_add_menu_item ; parent: table14
table14 ; parent: GtkNotebook
GtkNotebook ; parent: GtkVBox
GtkVBox ; parent: GtkVBox
GtkVBox ; parent: GtkFrame
GtkFrame ; parent: pro_properties

which is ok. It finds the toplevel property window, but then the following
call in lookup_widget

found_widget = (GtkWidget*) gtk_object_get_user_data (GTK_OBJECT (widget));

returns a NULL pointer. I have been trying for 3 days now, but nothing
seems to work. Any suggestions or pointers to things i could try are very
much appreciated. Also if someone knows a way to print a tree of the
widgets in a program and their names and relations, please let me know. 

regards,

roel






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