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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a370fcbf5c4dae94 X-Google-Attributes: gid103376,public From: "Anthony E. Glover" Subject: Re: How to?: Re-dispatching within an inherited method Date: 1999/08/18 Message-ID: <37BB74A8.F35560F7@hiwaay.net>#1/1 X-Deja-AN: 514529811 References: <37AF0ADE.3D80FEB3@hiwaay.net> <7onk8f$2qg@hobbes.crc.com> <37b9a823@news1.us.ibm.net> <7pcar9$aeg@hobbes.crc.com> <37bae808@news1.us.ibm.net> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------20FEA9583C15AFD0886C89A5" X-Trace: typ11.nn.bcandid.com 935031978 208.166.127.39 (Wed, 18 Aug 1999 23:06:18 EDT) MIME-Version: 1.0 Reply-To: aeg@hiwaay.net NNTP-Posting-Date: Wed, 18 Aug 1999 23:06:18 EDT Newsgroups: comp.lang.ada Date: 1999-08-18T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------20FEA9583C15AFD0886C89A5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In my case, I am using pointers to objects; so, I actually have to 'use' all derived type packages and then make the procedure call without full dot notation, such as: use A; use B; ... ... Run_Widget( UnknownWidget.all ); Where UnknownWidget is a pointer to the class wide type. Is there a better way of doing this? If I add a new package with another derived type, then I have to go add 'uses' to all packages that make calls to methods of the class. Tony Matthew Heaney wrote: > > In article <7pcar9$aeg@hobbes.crc.com> , "David C. Hoos, Sr." > wrote: > > > Without a class-wide Run_Widget, however, the call to > > Run_Widget with an actual parameter of type BigWidget is > > illegal -- a type conversion is required there. > > > > Yes, but that's because you used expanded name notation: > > A.Run_Widget (The_BigWidget); -- illegal > > If you want to call the version of the operation that's primitive for > BigWidget, then you have to name the correct operation: > > B.Run_Widget (The_BigWidget); > > No type conversion is required. > > >> With the change, you can say: > >> > >> B.Run_Widget (The_BigWidget); > >> > >> and all is well. > -- > Matt > > It is impossible to feel great confidence in a negative theory which has > always rested its main support on the weak points of its opponent. > > Joseph Needham, "A Mechanistic Criticism of Vitalism" --------------20FEA9583C15AFD0886C89A5 Content-Type: text/x-vcard; charset=us-ascii; name="aeg.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Anthony E. Glover Content-Disposition: attachment; filename="aeg.vcf" begin:vcard n:Glover;Anthony E. tel;fax:256-721-1816 tel;home:256-837-7017 tel;work:256-721-7714 X249 x-mozilla-html:FALSE url:www.elmco.com org:ELMCO, Inc. version:2.1 email;internet:aeg@hiwaay.net title:Senior Software Engineer adr;quoted-printable:;;6000 Technology Drive=0D=0ASuite N;Huntsville;AL;35805;USA x-mozilla-cpt:;1 fn:Anthony E. Glover end:vcard --------------20FEA9583C15AFD0886C89A5--