comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada)
Date: Mon, 3 Dec 2012 21:56:22 +0000 (UTC)
Date: 2012-12-03T21:56:22+00:00	[thread overview]
Message-ID: <k9j766$7ct$1@dont-email.me> (raw)
In-Reply-To: b8d27d58-e794-4cf8-b344-79940ba8881d@googlegroups.com

On Mon, 03 Dec 2012 08:17:26 -0800, ake.ragnar.dahlgren wrote:

> On Thursday, November 22, 2012 1:13:27 PM UTC+1, Brian Drummond wrote:
>> On Thu, 22 Nov 2012 01:47:39 -0800, ake.ragnar.dahlgren wrote: > I want
>> to thank everybody for replying. I had no idea about the > "renames"
>> feature as Randy pointed out. Brian expressed it very well: I > am
>> astonished! But heed Randy's warning : (I may have been confused among
>> the discussion and speculation, but my understanding is this:
>> corrections welcome!) the Renames is legal and intended to work as
>> demonstrated: taking its access is ILLEGAL...
>> Brian
> 
> Thank you for your suggestion to use Gate3. I will check it out.
> 
> Yesterday I posted Ada code which uses Access on a renamed procedure.
> It's not clear to me but is it really illegal as you write? I hope you
> are not sure since you wrote corrections are welcome.

I was expecting corrections on the legality of the rename in the first 
place; Randy and Adam have me convinced that taking its access is a Gnat 
fluke...

I *think* the answer is to register On_Quit as an Object_Handler rather 
than a Builder_Handler, as I suggested on Nov.20, to overcome the 
restrictions on argument type for a Builder Handler (which if I 
understand, is why you need the Rename contortion to make the first 
argument disappear)

Unfortunately, the correct way to use Object_Handler does not seem to 
have documentation/example code to help people like me get started ... 
yet. In my original example (linked from the ada.dk tutorial), the 
restriction on parameter formats for handlers was questioned in the 
comments, but I don't know the answers yet.

But I am convinced there *will be* a better way than the rename trick 
(and legal!) when we find it...

- Brian



      reply	other threads:[~2012-12-03 21:56 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  9:59 Access type to member procedure of instance (Object Oriented programming in Ada) ake.ragnar.dahlgren
2012-11-19 11:13 ` Georg Bauhaus
2012-11-19 11:39 ` Brian Drummond
2012-11-20 11:43   ` Brian Drummond
2012-11-20 21:57     ` Randy Brukardt
2012-11-19 13:03 ` sbelmont700
2012-11-19 16:18 ` Adam Beneschan
2012-11-19 17:02   ` Peter C. Chapin
2012-11-19 18:23     ` Adam Beneschan
2012-11-19 20:57       ` Peter C. Chapin
2012-11-19 21:26       ` Dmitry A. Kazakov
2012-11-19 22:19         ` Adam Beneschan
2012-11-20 10:12           ` Dmitry A. Kazakov
2012-11-20 21:51             ` Randy Brukardt
2012-11-21  8:24               ` Dmitry A. Kazakov
2012-11-21 22:19                 ` Randy Brukardt
2012-11-20 10:59     ` Brian Drummond
2012-11-19 20:22 ` ake.ragnar.dahlgren
2012-11-20 11:16   ` Brian Drummond
2012-11-19 20:52 ` ake.ragnar.dahlgren
2012-11-19 21:56   ` Dmitry A. Kazakov
2012-11-22  9:49     ` ake.ragnar.dahlgren
2012-11-19 22:13   ` sbelmont700
2012-11-19 23:59 ` Randy Brukardt
2012-11-20  0:05   ` Randy Brukardt
2012-11-20  1:00     ` Adam Beneschan
2012-11-20 21:38       ` Randy Brukardt
2012-11-20 23:43         ` Adam Beneschan
2012-11-21 22:12           ` Randy Brukardt
2012-11-22  1:59             ` Adam Beneschan
2012-11-29  2:43               ` Randy Brukardt
2012-11-20  0:52   ` Adam Beneschan
2012-11-20 21:34     ` Randy Brukardt
2012-11-20 11:28   ` Brian Drummond
2012-11-20 14:27     ` Georg Bauhaus
2012-11-20 15:52     ` Adam Beneschan
2012-11-22  9:47 ` ake.ragnar.dahlgren
2012-11-22 10:25   ` Dmitry A. Kazakov
2012-12-02 20:42     ` ake.ragnar.dahlgren
2012-12-03 11:21       ` Dmitry A. Kazakov
2012-12-03 20:21         ` ake.ragnar.dahlgren
2012-12-03 22:15           ` Dmitry A. Kazakov
2012-12-25 21:51           ` Gustaf Thorslund
2012-12-26 18:11             ` ake.ragnar.dahlgren
2012-11-22 12:13   ` Brian Drummond
2012-12-03 16:17     ` ake.ragnar.dahlgren
2012-12-03 21:56       ` Brian Drummond [this message]
replies disabled

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