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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,efe941d6d79d0fa7 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Wed, 16 Sep 2009 08:43:20 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada OpenGL question References: <4aafcc54$0$2860$ba620e4c@news.skynet.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4ab08904$0$2848$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 43e49341.news.skynet.be X-Trace: 1253083396 news.skynet.be 2848 81.242.189.125:39703 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:8341 Date: 2009-09-16T08:43:20+02:00 List-Id: Ludovic Brenta wrote: > In your example, Expose'Access presumably designates a procedure. > This is wrong. Expose should be a function returning Boolean. The > return value means: > > False: pass the signal to any other signal handlers attached to it > True: abort processing of the signal. > > The same holds for delete_event and a few other signals as documented > in the GTK+ reference at http://www.gtk.org. > > The GtkAda signal handler infrastructure makes it impossible to detect > the type mismatch at compile time, so it has run-time checks instead. > This is the source of the error message. > > HTH > > -- > Ludovic Brenta. Thanks for your help Ludovic! I do not know how to solve it. I have tried to change the Expose procedure into a function returning a Boolean, but then it does not compile anymore: gtkgl.adb:89:66: no candidate interpretations match the actuals: gtkgl.adb:89:87: expected type "Handler" defined at gtk-marshallers.ads:355, instance at gtk-handlers.ads:915, instance at line 68 gtkgl.adb:89:87: found type access to function "Expose" defined at line 89 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:939, instance at line 68 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:934, instance at line 68 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:930, instance at line 68 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:926, instance at line 68 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:922, instance at line 68 gtkgl.adb:89:87: ==> in call to "To_Marshaller" at gtk-handlers.ads:918, instance at line 68 Olivier