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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!eweka.nl!hq-usenetpeers.eweka.nl!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 13 Dec 2010 09:09:32 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Properties Date: Mon, 13 Dec 2010 15:10:42 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <083addb2-61f6-4a69-bb81-2e4fa640783b@e16g2000pri.googlegroups.com> <124c5qinlvj7c$.1pdr35p7hkp11.dlg@40tude.net> <75475874-cd6c-4e75-8a2f-7675ecf0864a@f20g2000vbc.googlegroups.com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-rpEiNwYGnc47LLdVS3eC7KLcx+uX1suha1GABKTz5Zp85St5oqJLZ4oBpso8Pr5OSBWmUC/xspilywJ!05RYVroIDq/7rxoZ7fUga/0L1mBimGIMh60mZoJv8JUp4PWN6wD/9SjLUSiAIMYJr4Z/o3kqC7eW!Ydw= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com 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.40 X-Original-Bytes: 2507 Xref: g2news2.google.com comp.lang.ada:16883 Date: 2010-12-13T15:10:42+00:00 List-Id: On Fri, 3 Dec 2010 15:14:09 -0600, "Randy Brukardt" wrote: >"Shark8" wrote in message >news:75475874-cd6c-4e75-8a2f-7675ecf0864a@f20g2000vbc.googlegroups.com... >... >>It is somewhat irritating that you cannot initialize element to >>GUI_Base'Class directly. ... >>instantiation error at a-convec.ads:321 >>"unconstrained element type in array declaration actual for >>"Element_Type" must be a definite subtype" > >Right, but you are using the wrong container for this. Try the indefinite >containers (designed specifically for this purpose): > >Package GUI_Vector is New Ada.Containers.Indefinite_Vectors > ( Element_Type => GUI_Base'Class, Index_Type => Positive ); > >This will work fine. Excellent! But perhaps the error message could be improved to suggest this, e.g. >>"unconstrained element type in array declaration actual for >>"Element_Type" must be a definite subtype, or container must be indefinite" - Brian