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 Path: g2news2.google.com!postnews.google.com!k26g2000vbp.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada OpenGL question Date: Tue, 15 Sep 2009 11:19:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4aafcc54$0$2860$ba620e4c@news.skynet.be> NNTP-Posting-Host: 94.108.228.143 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1253038782 1403 127.0.0.1 (15 Sep 2009 18:19:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 15 Sep 2009 18:19:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k26g2000vbp.googlegroups.com; posting-host=94.108.228.143; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.12 (Debian-3.0.12-1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8331 Date: 2009-09-15T11:19:42-07:00 List-Id: On Sep 15, 7:18=A0pm, Olivier Scalbert wrote: > Hi all, > > I have found some OpenGL code there:http://adaopengl.sourceforge.net/down= loads.php > > I manage to get it compiled on my linux box but when I run it, I have: > > raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : Handlers for "expose_event" on > a GtkGLArea should be functions > > So it looks I have problem with callbacks somewhere around: > Destroy_CB.Connect(MyGL, "destroy", Destroy_CB.To_Marshaller( Quit'Access= )); > > Expose_CB.Connect(MyGL, "expose_event", Expose_CB.To_Marshaller( > Expose'Access)); > > Resize_CB.Connect(MyGL, "configure_event", Resize_CB.To_Marshaller( > Reshape'Access)); > > All the files are located there:http://scalbert.dyndns.org/ada/adagtkgl/ > > If somebody can help me, I would appreciate ! > > Thanks, > > Olivier 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.