comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Private primitive operations available to entire package hierarchy. Can it be done?
Date: Mon, 8 Aug 2005 15:47:58 -0500
Date: 2005-08-08T15:47:58-05:00	[thread overview]
Message-ID: <i6SdnZ2dnZ1c76LgnZ2dnbJZat-dnZ2dRVn-0Z2dnZ0@megapath.net> (raw)
In-Reply-To: 1123524248.690333.24270@g14g2000cwa.googlegroups.com

"Lucretia" <lucretia9@lycos.co.uk> wrote in message
news:1123524248.690333.24270@g14g2000cwa.googlegroups.com...
> <quote>
> We do use something like reference counting to allow Window objects to
> be
> assigned. But that capability was a mistake - we wouldn't do it if
> starting
> over - so I won't try to describe it.
> </quote>
>
> I started with a non-limited hierarchy that could be copied but found
> that not all wxWidgets classes can be copied as the copy constructor is
> private in certain objects, e.g. all wxWindow derived types. So, I now
> have a limited hierarchy, even though certain objects need to be
> copiable, e.g. wxEvent derived types.

There are ways around that. But we ultimately found that they made it very
hard to cleanly add extension components to derived window classes. So many
of our programs include
    procedure Adjust (Object : in out Whatever_Window) is
    begin
          raise Program_Error;
    end Adjust;

Effectively making that type limited (without the compile-time checking).
But of course, if we were going to do that, we might as well have made the
types limited in the first place and avoided the complications. So I agree
with your intent to make them limited.

                        Randy.






      reply	other threads:[~2005-08-08 20:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 16:06 Private primitive operations available to entire package hierarchy. Can it be done? Lucretia
2005-07-07 16:17 ` OT: Joke Adrien Plisson
2005-07-07 16:24   ` Matthew Heaney
2005-07-07 19:10 ` Private primitive operations available to entire package hierarchy. Can it be done? Randy Brukardt
2005-07-13 15:40   ` Lucretia
2005-07-19 23:19     ` Randy Brukardt
2005-07-20 18:14       ` Lucretia
2005-07-21  3:10         ` Randy Brukardt
2005-07-25 18:14           ` Lucretia
2005-07-25 23:58             ` Randy Brukardt
2005-07-27 17:36               ` Lucretia
2005-07-27 21:28                 ` Randy Brukardt
2005-07-28 10:09                   ` Lucretia
2005-07-29  0:40                     ` Randy Brukardt
2005-08-02 15:55                       ` Lucretia
2005-08-03 18:26                         ` Lucretia
2005-08-03 20:04                           ` Randy Brukardt
2005-08-03 20:03                         ` Randy Brukardt
2005-08-08 18:04                           ` Lucretia
2005-08-08 20:47                             ` Randy Brukardt [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