comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: Closing a program with GTK
Date: Thu, 22 Sep 2011 14:36:36 +0200
Date: 2011-09-22T14:36:36+02:00	[thread overview]
Message-ID: <4e7b2b6d$0$2601$703f8584@news.kpn.nl> (raw)
In-Reply-To: <sdmxk3iekz24.1pquann2siya2$.dlg@40tude.net>

It maybe pointless but the destroy method the close button reaches is the 
one that gives the segmentation fault. The routine On_Window_Destroy is the 
one that closes the window and ends the program.
I need that routine carried out. I don't think it is a good idea to alter 
the gtk.object.destroy routine so what can I do?

L. Dries

"Dmitry A. Kazakov"  schreef in bericht 
news:sdmxk3iekz24.1pquann2siya2$.dlg@40tude.net...

On Thu, 22 Sep 2011 12:24:03 +0200, ldries46 wrote:

> I just have corrected the problem for  the quit menu button, and that
> worked. Thanks for that. But the problem with the Close button on top of 
> the
> window stays
>
> The code of the procedures is now
> procedure On_Quit1_Activate
>   (Object : access Gtk_Image_Menu_Item_Record'Class)
> is
>    pragma Unreferenced (Object);
> begin
>    On_Window_Destroy(Transc_AdaWindow);

If you want to destroy a window, you have to call its Destroy. Calling a
handler is pointless.

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




  reply	other threads:[~2011-09-22 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-09-22 13:48         ` Dmitry A. Kazakov
2012-07-26 21:59           ` Jack Mitchell
2011-09-22 23:06         ` Randy Brukardt
replies disabled

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