[gtkada] Glade-2 / Gate interaction, creation of main subprogram.

Arnaud Charlet charlet at ACT-Europe.FR
Fri Oct 10 11:51:51 CEST 2003


> It seems to me that declaring the pointer variables in the main
> subprogram makes it impossible to access their child widgets from
> anywhere else, for example from a callback package body.  Clearly one
> could move declarations to the package manually, but I wonder if there
> is a better way?  Thanks, 

The better way is to define your own variables based on the specific
needs of your project, in your own package/procedure.

The default global variable was only provided as an example, and was being
misused by most people, which is why it has been moved.

Generally speaking, it is in any case not a good idea to have global
variables in your application. Instead, you can use local variables, and
when needed, pass these variables as parameters to procedures that need
to access them.

Arno



More information about the gtkada mailing list