comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: GTk3 without the Gtkbuilder and Glad
Date: Sun, 12 Jun 2016 09:50:01 +0200
Date: 2016-06-12T09:50:01+02:00	[thread overview]
Message-ID: <575d15b6$0$28284$e4fe514c@news.kpn.nl> (raw)
In-Reply-To: <njhia6$6t5$1@dont-email.me>

Indeed I had still a few thing not correct, but now I havethe errors.

I now have the following code:

package Windows_Callback is new
  Gtk.Handlers.Return_Callback (Main_Window_Record, boolean);

This line is the first only one the package where the following statement is 
used

Windows_Callback.Connect(MainWindow, "delete_event",
                         Windows_Callback.To_Marshaller(On_Window_Destroy'Access));

function On_Window_Destroy (Object : access Gtk_Window_Record'Class;
                            Event : Gdk.Event.Gdk_Event) return Boolean;

No candidate interpretation match the actuals point to just before 
.To_Marshaller
and expected type handler defined points to just before 'Access

Deleting 'Access does not solve the problem

Changing "destroy"into "delete_event" does that neither.

"Jeffrey R. Carter"  schreef in bericht news:njhia6$6t5$1@dont-email.me...

On 06/11/2016 01:27 AM, ldries46 wrote:
>
> /I think I did exactly as you told, what went wrong/

Some observations:

* Mine_Detector's handler handles the "delete_event" event and is called 
when
the user clicks on the close button in the title bar (the only way to exit
Mine_Detector). You're trying to handle the "destroy" event. If you want to
respond to the close button in the title bar, and it sounds to me as if you 
do,
then you should probably handle "delete_event".

* The parameter list for your callback function is different from that in
Mine_Detector. They should be the same.

* You reference the Object parameter of your callback function (you pass it 
to a
procedure), but have a pragma Unreferenced for it.

-- 
Jeff Carter
"I certainly have not the talent which some people possess, ...
of conversing easily with those I have never seen before."
Pride and Prejudice
121 


  reply	other threads:[~2016-06-12  7:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 18:16 GTk3 without the Gtkbuilder and Glad ldries46
2016-06-10 18:38 ` Jeffrey R. Carter
     [not found]   ` <575bcceb$0$28281$e4fe514c@news.kpn.nl>
2016-06-11 17:38     ` Jeffrey R. Carter
2016-06-12  7:50       ` ldries46 [this message]
2016-06-12 17:10         ` Jeffrey R. Carter
2016-06-13  7:40           ` ldries46
2016-06-13 15:50             ` Jeffrey R. Carter
2016-06-10 19:55 ` Dmitry A. Kazakov
replies disabled

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