comp.lang.ada
 help / color / mirror / Atom feed
* Closing a program with GTK
@ 2011-09-22  1:21 ldries46
  2011-09-22  7:20 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 8+ messages in thread
From: ldries46 @ 2011-09-22  1:21 UTC (permalink / raw)


I have a program in which I want to stop the program to quit while first 
conducting a special task. The program is linked with the "-mwindows" to get 
rid of the DOS-window.
I am running on a Windows 7 system
I am using the following routines in the .callback package
-----------------------
-- On_Quit1_Activate --
-----------------------

procedure On_Quit1_Activate
  (Object : access Gtk_Image_Menu_Item_Record'Class)
is
   pragma Unreferenced (Object);
begin
   Destroy(Transc_AdaWindow);
end On_Quit1_Activate;

where Transc_AdaWindow is the top level window and
-----------------------
-- On_Window_Destroy --
-----------------------

procedure On_Window_Destroy
  (Object : access Gtk_Widget_Record'Class)
is
   pragma Unreferenced (Object);
begin
   Close_Ini;
end On_Window_Destroy;

where Close_Ini is the action that must be executed
Close_Ini is part of a package with no reference to GTK routines.

In both the cases That I use the On Quit facility or the windows abort 
button I get the following message:
Program received signal SIGSEGV, Segmentation fault.
0x0003fd43 in ?? ()

When debugging in GPS I found that the message is generated in the 
gtk_object package in the Destroy routine at the moment that you enter the 
Internal routine with the Step button

What do I do wrong, this construction worked in another program whitout 
the -mswindows switch, but I need this switch to get a full stop op the 
program with the Quit menuitem or the abort button

L. Dries







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

end of thread, other threads:[~2012-08-01  2:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22  1:21 Closing a program with GTK ldries46
2011-09-22  7:20 ` Dmitry A. Kazakov
2011-09-22 10:24   ` ldries46
2011-09-22 12:07     ` Dmitry A. Kazakov
2011-09-22 12:36       ` ldries46
2011-09-22 13:48         ` Dmitry A. Kazakov
2012-07-26 21:59           ` Jack Mitchell
2011-09-22 23:06         ` Randy Brukardt

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