[Glade-users] globals vs locals... again
- From: james cameron compaq com (James Cameron)
- Subject: [Glade-users] globals vs locals... again
- Date: Fri, 06 Oct 2000 14:47:15 +1100
"James K. Wiggs" wrote:
Then lookup_widget() first does a loop looking for the parentless
widget, i.e. the top-level window,
Damon, perhaps it should use gtk_widget_get_toplevel() instead. ;-)
Then if I did a modified version of lookup_widget() which only looked
at the child objects of the widget, not doing that loop up to the
top-level, I could pass it the address of the frame containing the
table and I should be able to get the right widgets in the right order.
Does this sound reasonable?
Yes, and quite simple.
Although if it is that important, I'd be saving the widget pointers in a
structure or array at the outset rather than doing a name lookup each
time.
Yes, it sounds painful, indeed. Still, it might be nice to set up a
version of lookup_widget() which only loops through the children of the
widget passed to it, looking for one with the appropriate name.
Easily done. I needed a version of lookup_widget() that does not
complain if it fails to find the widget. I just copied it and called it
widget().
--
James Cameron (cameron stl dec com)
OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
"Specialisation is for insects." -- Robert Heinlein.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]