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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1c7098170d1fe6a5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-12 12:51:45 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: Heterogenous_Array_Test: please explain error Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Tue, 12 Jun 2001 15:50:47 EDT Organization: http://www.newsranger.com Date: Tue, 12 Jun 2001 19:50:47 GMT Xref: archiver1.google.com comp.lang.ada:8624 Date: 2001-06-12T19:50:47+00:00 List-Id: In article , M. A. Alves says... > >Isn't this the 'standard' way of implementing an heterogenous array? >Why is it not working? Please explain the compiler's error on the last >statement. Thanks. > Item(2).Child_Component := 22; > -- error: no selector "Child_Component" for type "Root'Class" The problem is pretty much what the compiler says it is. The type of elements in your Item array is "Root'Class". That type doesn't have any components named "Child_Component". If you want to access that component, you have to tell the compiler that the type is really "Child" (which it will verify at runtime just to be sure). I think something like the following will work, though I haven't compiled it: Child'(Item(2).all).Child_Component := 22; --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com