[Glade-users] globals vs locals... again



I too was stumped for a moment on this issue. Having worked with several
other gui builders, it became clear how to work around it. My question
is: is there a cleaner way?

There are several variations on the theme, in my limited experience,
imployed by other builders. These involve either defining all widgets as
globals, toplevel widgets as globals, or pointers to toplevel widget
structures as globals.

I prefer the third option as it provides direct access to all defined
widgets but allows the re-use of widget names between windows with no
variable naming conflicts.

At the very least, I prefer to have the toplevel widgets defined as
global. This provides direct access to the toplevels which can then be
used by lookup to find the desired widget.

FWIW.

David





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