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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.140.171.137 with SMTP id r131mr3427751qhr.5.1448228661272; Sun, 22 Nov 2015 13:44:21 -0800 (PST) X-Received: by 10.182.28.129 with SMTP id b1mr275418obh.4.1448228661229; Sun, 22 Nov 2015 13:44:21 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!f78no1431204qge.1!news-out.google.com!f6ni10488igq.0!nntp.google.com!mv3no799862igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 22 Nov 2015 13:44:21 -0800 (PST) In-Reply-To: <5f76d6a8-f733-4f36-89df-56eefcd795f8@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.119.168.221; posting-account=O3LyFwoAAACc1uh60ZcOUmAGdDmGsEcV NNTP-Posting-Host: 80.119.168.221 References: <5f76d6a8-f733-4f36-89df-56eefcd795f8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <33bdc708-11fa-4091-8569-9436397e1695@googlegroups.com> Subject: Re: Gnoga Callback Handlers with user data From: slos Injection-Date: Sun, 22 Nov 2015 21:44:21 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28495 Date: 2015-11-22T13:44:21-08:00 List-Id: Dear Mister Botton, Thanks for your answer. Le dimanche 22 novembre 2015 16:42:25 UTC+1, David Botton a =E9crit=A0: > The handler will be receiving Object a class-wide object as its parameter= which contains the actual Ada Object (in this case the My_Button instance)= bound to the button. So you can just check to see if Object is My_Button o= r any other button using Ada or you can compare Unique_IDs (if My_Button.Un= ique_ID =3D Object.Unique_ID). >=20 In your tutorial tutorial_04.adb we have : procedure On_Click (Object : in out Gnoga.Gui.Base.Base_Type'Class) is App : App_Access :=3D App_Access (Object.Connection_Data); begin App.My_View.Put ("I've been clicked! "); where : type App_Data is new Gnoga.Types.Connection_Data_Type with record My_View : Gnoga.Gui.View.View_Type; My_Button : Gnoga.Gui.Element.Common.Button_Type; My_Exit : Gnoga.Gui.Element.Common.Button_Type; Flasher : aliased Gnoga.Gui.Element.Common.DIV_Type; is associated with : Main_Window.Connection_Data (App); So actually, the On_Click handler gets all the App stuff without other indi= cation. > You should join the Gnoga list https://lists.sourceforge.net/lists/listin= fo/gnoga-list Yes I should but by writting here I wanted to show my interest for your pro= ject to others. Does it hurt ? Best Regards, St=E9phane "Ada for Automation" http://slo-ist.fr/ada4autom