have you seen my widgets?



ok, let me just say that i'm "getting by" by doing things the way i
am, but im more interested in the Right Way (tm) to do things
according to gtk.  say i have a window with a vbox with a notebook
with a page with a frame with a vbox with a combobox.  in my main
window's vbox, i also have packed a button that says "go."  now when
someone clicks "go" i want something to happen that deals with the
currently selected item in the combo box.  currently im using a
g_object_set_data "paper trail" to the combo box by essentially
nesting a reference to each level of widgets into the previous one if
that makes any sense.  that way i can get a pointer to the notebook
from the button and a pointer to the frame from the notebook and so on
until i find the combo box.  now, my app is actually a lot more
complex and i need to decide on a method of doing things asap before
it just gets outta control.  what are my alternatives (besides globals
- not just static because they have to span multiple objects) ???  is
there any way to just say combo =
get_freakin_combobox_button("comboname"); ?  is there even a way to
"name" widgets?  surely not everyone out there just keeps a pointer
hanging around globally to every widget they plan on using from some
other far away widget, right?

thanks for your help
handsome greg



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