RE: Reference to child of child



So, the solution would be to attach all children
info's to the parent (notebookpage) with set_data.
Each info = a pointer to the child (my GTK_TEXT widget).

Yes.

GtkWidget *text;
gtk_object_set_data (GTK_OBJECT (dialog), "text_some_name", text);

you can replace dialog by notebookpage if the text
widget address is specific for each page, otherwise
I think it's good design to try to attach always to 
the top level window, the dialog:

a) easier to maintain: in all your dialogs set_data/get_data 
will attach data to the same object, easier to avoid bugs,
easier to write code.

b) dialog is the only object that you know for sure
that is known in all your dialogs, after all you
need to destroy (or hide) it in the end.

etc...

What about gtk_widget_set_name? Should I use it?

Don't know.
Carlos




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