[gtkada] Newbie question: Glade-2 and child widget access

Leonardo Cecchi leonardoce at interfree.it
Mon Dec 27 10:55:47 CET 2004


Hi,

I have a question about how to access child widget from the callback package generated by Gate.
I can declare the main widget in a global variable (like in the editor example) but this is not a good idea if I need to have multiple window instances in my program.
I could modify the "<widget>_pkg.adb"  to call Object_Connect instead of Connect in order to receive the main widget as argument instead of the widget who reised the event but in the user guide I read:

	For each top level widget, Gate will generate a package <widget>_Pkg 
	in the files <widget>_pkg.ads and .adb. These packages contain all the 
	GtkAda calls needed to create the widgets you designed within Glade. 
	You will usually *not need to modify these files yourself*

and:

	This file, called callbacks_<program name>.ads contains all the Handler package 
	instantiations needed by your application. You will usually *not need to modify it*

I wonder to know what is the right way to do that.

I'm using GtkAda 2.4.0.

Thanks and excuse me for my really poor english.

Leonardo



More information about the gtkada mailing list