comp.lang.ada
 help / color / mirror / Atom feed
* Menu Exit, Red Button and Uncontrolled exits
@ 2009-04-27 14:38 ldries46
  2009-04-27 16:06 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 2+ messages in thread
From: ldries46 @ 2009-04-27 14:38 UTC (permalink / raw)


I want in ADA with GTKADA in my program make use of the same exit handler 
with the Exit in the menu structure, the Windows standard exit button and in 
case of some uncontrolled exit ( all destructive exceptions ).
I have the handler for the exit button, how can I create rerouting for the 
other two so that in either case the program stops in thye same controlled 
way.

-- 
=========================
Familie Dries
Torenpad 122 A
2771 EV Boskoop 





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Menu Exit, Red Button and Uncontrolled exits
  2009-04-27 14:38 Menu Exit, Red Button and Uncontrolled exits ldries46
@ 2009-04-27 16:06 ` Dmitry A. Kazakov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry A. Kazakov @ 2009-04-27 16:06 UTC (permalink / raw)


On Mon, 27 Apr 2009 16:38:07 +0200, ldries46 wrote:

> I want in ADA with GTKADA in my program make use of the same exit handler 
> with the Exit in the menu structure, the Windows standard exit button and in 
> case of some uncontrolled exit ( all destructive exceptions ).
> I have the handler for the exit button, how can I create rerouting for the 
> other two so that in either case the program stops in thye same controlled 
> way.

GtkAda functions in a way that Ada procedures (callbacks) are called from
Gtk, which in turn is called from Ada's main task. So you can only catch
the exceptions within the callbacks. If they propagate further to Gtk, that
mould most likely crash your program. So if you meant to catch an exception
in a callback, then you could emit a button click event for exit button
from there. A simple way to do it is to call Clicked

https://libre.adacore.com/GtkAda/docs/2.8/gtkada_rm/gtk-button.html#Clicked_24_

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-27 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-27 14:38 Menu Exit, Red Button and Uncontrolled exits ldries46
2009-04-27 16:06 ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox