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

NASH DAVID LTC dd9875 at eecs1.eecs.usma.edu
Thu Oct 9 15:58:25 CEST 2003


Dear friends,

I have a question that concerns the way that gate-in.exe creates the
Ada source based on a Glade-2 project file.  It seems that under
GtkAda 2.2.0, a main subprogram is generated that takes the name of
the first GtkWindow object (which is window1, by default).  For every
GtkWindow object that is part of the project, a variable of the
appropriate access type is declared in the main subprogram, and is
initialized appropriately by calling Gtk_New and Show_All.   

This is a change from the previous major version of GtkAda, wherein
the access type variables that were associated with GtkWindow objects
were declared in the same packages where their tagged types were
declared -- not in the main subprogram. 

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, 


LTC David Nash
Computer Support Group
Department of Electrical Engineering and Computer Science
United States Military Academy
West Point, NY 10996

David.Nash at usma.edu
Room 1115, Thayer Hall
Voice: (845) 938-5575; Fax: (845) 938-5956




More information about the gtkada mailing list