From: Damon Chaplin (damon@karuna.freeserve.co.uk)
Date: Wed Aug 18 1999 - 04:39:33 EDT
vovin@footek.dhs.org wrote:
>
> Hello, i realy have a problem here.
> I think i posted some kind of question like this before.. but... i realy
> dont know what to do.
>
> I have made gnome window and a simple window with some options.
> Now i want that if i pressed the "button7" on the "simple window".. then
> the "simple window" shall be hidden.
> But.. The problem is that the functon "on button7 clicked" dont know about
> the window its placed in.. :(
> i tried with lookup_widget as i think some one here recomended me to do
> the code i tried lookes like this.
>
> void
> on_button7_clicked (GtkButton *button,
> gpointer user_data)
> {
> GtkWidget *window1;
> printf(" button7 pressed\n");
>
> window1 = lookup_widget (GTK_WIDGET (window1), "window1");
>
> }
The first argument to lookup_widget() must be a pointer to an existing
widget. You used window1 above, which was just an uninitialised
variable. You needed to use button instead:
window1 = lookup_widget (GTK_WIDGET (button), "window1");
Damon
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to majordomo@ncis.pn.org
with the line "unsubscribe glade-devel" in the body of the message.
This archive was generated by hypermail 2b29 : Tue Aug 01 2000 - 19:21:59 EDT