From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, TVD_FINGER_02 autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: "ldries46" Newsgroups: comp.lang.ada References: <575b0403$0$12046$e4fe514c@news.kpn.nl> <575bcceb$0$28281$e4fe514c@news.kpn.nl> In-Reply-To: Subject: Re: GTk3 without the Gtkbuilder and Glad Date: Sun, 12 Jun 2016 09:50:01 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Message-ID: <575d15b6$0$28284$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 77.168.179.107 X-Trace: 1465718198 dreader33.news.xs4all.nl 28284 77.168.179.107:53260 X-Complaints-To: abuse@kpn.nl Xref: news.eternal-september.org comp.lang.ada:30698 Date: 2016-06-12T09:50:01+02:00 List-Id: 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