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



Nothing should be global.  Making widget pointers global prevents you
from having multiple instances of a widget realised.  It also suggests 
a
design that violates the principles of modular isolation.  It causes 
interdependencies that increase the maintenance cost.
(...)

It's the same problem as initializing the lists. I have
a 'void init ()' function that I could launch at start
and if my clist widget was global, I could access it
in the init() function. It's a pain if you have to
sent the clist pointer to the function because some-
times you need to send many different widgets.

Alex



"Rather than love, than money, than
fame, give me Truth"





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