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: 103376,95dad6602b955ce1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Tue, 11 Oct 2005 16:19:40 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1129043820.987947.200870@z14g2000cwz.googlegroups.com> Subject: Re: [wxAda] Problem with "limited with" in a *real* application Date: Tue, 11 Oct 2005 16:23:21 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-csteND9SGHMjqov1C9koMa9HL36mbvCuVyc3NF4RUUpw90ce9jrbAcJMxLwYLPd3LN0iKLsn4CI/PCW!Eg+z5sheXVWhyg90vYf8h/oKw9bVCnhACNeVtnC6UrnlefWmpwjNagx2ryGwPprs5sRnqgV0qI9E X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5553 Date: 2005-10-11T16:23:21-05:00 List-Id: "Lucretia" 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.