comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: [wxAda] Problem with "limited with" in a *real* application
Date: Tue, 11 Oct 2005 16:23:21 -0500
Date: 2005-10-11T16:23:21-05:00	[thread overview]
Message-ID: <rNWdnWX7uLTwsdHeRVn-uQ@megapath.net> (raw)
In-Reply-To: 1129043820.987947.200870@z14g2000cwz.googlegroups.com

"Lucretia" <lucretia9@lycos.co.uk> wrote in message
news:1129043820.987947.200870@z14g2000cwz.googlegroups.com...
...
> Inside wx.Core.Sizer I have a Set_Sizer procedure which actually
> belongs to the wxWindow class and thus should be inside wx.Core.Window.
> It cannot go there currently, because of cyclic dependencies
> (wx.Core.Sizer also requires access to wx.Core.Window). I have tried to
> get this working using Ada 2005's "limited with" but for some reason I
> just cannot get it to compile. I think wx.Core.Window needs to have the
> full view of the Sizer_Type.

Yes, it does. And you can get it by putting a *regular* with of
wx.Core.Sizer on the *body* of wx.Core.Window.

That's the expected pattern: limited with on the spec to break circularity,
(regular) with on the body to allow the use of the full type. You do need to
worry about elaboration issues when you do this, though (preferably, avoid
doing any calls during the elaboration of the packages). This latter concern
doesn't exist in the "default" GNAT elaboration mode (which isn't quite the
same as Ada's), but it does if you worry about portability of your code.

                                Randy.









  reply	other threads:[~2005-10-11 21:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 15:17 [wxAda] Problem with "limited with" in a *real* application Lucretia
2005-10-11 21:23 ` Randy Brukardt [this message]
2005-10-12 17:06   ` Lucretia
2005-10-13 14:50     ` Lucretia
2005-10-13 16:18       ` Lucretia
2005-10-14  0:36         ` Randy Brukardt
2005-10-14 15:03           ` Lucretia
2005-10-14 23:47             ` Randy Brukardt
2005-10-15 13:48               ` Lucretia
replies disabled

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