[gtkada] Sequence of control

Preben Randhol randhol+gtkada at pvv.org
Wed Jun 1 09:01:35 CEST 2005


On Wed, Jun 01, 2005 at 09:23:59AM +0800, Rick Duley wrote:
> Hi folks
> 
> I tried using an exit statement but received the following messges when I
> attempted to compile:
> 
> <Gtk.Main.Exit> => 'reserved word "exit" cannot be used as an identifier'
> 
> <Gtk>Main.Quit> => 'procedure or entry name expected'

Sorry my failt. It should be: Gtk.Main.Main_Quit;


> I didn't get time last night to pursue this any further, but I still
> have a problem with this idea:
> 
> If the call to Destroy_Cb(<Widget>) doesn't drop the point of control
> out of the main loop, *what does?*  Surely, in the context of the
> attached sources, once the Window has 'died' control should return to
> the mainline.

But it does return control to the main loop. You don't want to jump out
of this.

What you should do is to put what you want to do after the dialog gets
closed (I mean all calculations etc...) in a procuder. Then
you call this procedure from the callback. The program will then do the
calculations and be happy and you can open a new dialog or have another
window open. You only want to exit the Gtk.Main when you want to end your
program unless there is other spesific reasons.

> What happens when this Window is, as intended, called from the main
> window of the GUI rather than the test routine
> Ada60_Preferences_Window?

See above

-- 
Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 --
                 «For me, Ada95 puts back the joy in programming.»



More information about the gtkada mailing list