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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bf74002cd6321001,start X-Google-Attributes: gid103376,public From: Christopher Campise Subject: Help again please... Date: 1998/04/17 Message-ID: <3537AC42.FAF280C@amherst.com>#1/1 X-Deja-AN: 345120376 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Amherst Systems, Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-04-17T00:00:00+00:00 List-Id: Please excuse my ignorance, but I am fairly new to Ada95... Another question regarding Generic extensions; I have the packages as follow: ------------------- --base class: spec ------------------- generic type Value_Class is private; package Generic_Class is type Class is tagged private; procedure Set_Value(The_Widget : in out Class; The_Value : in Value_Class); private type Class is tagged record Some_Value : Value_Class; end record; end Generic_Class; ------------------------ --widget package spec ------------------------ with Generic_Class; generic with package Instance is new Generic_Class with private; package Widget is type Class is new Instance.Class with private; ... private type Class is new Instance.Class with record Index : Integer: Kind : Integer; end record; end Widget; ---------------------------- -- list widget package spec ---------------------------- with Widget; generic with package Instance is new Widget with private; package List_Widget is type Class is new Instance.Class with private; ... private type Class is new Instance.Class with record Item_Count : Integer; end record; end List_Widget; ------------------------- -- Dialog package spec ------------------------- with List_Widget; generic with package Instance is new List_Widget with private; package Dialog is type Class is new Instance.Class with null record; end Dialog; ------------------------- -- Dialog package body ------------------------- package body Dialog is List1 : Class; List2 : Class; begin ... --do some list manipulations Final_Class.Set_Value(Widget => List1, The_Value => 1); -- I run into problems here. I have to call my procedure from generic_class but I receive a compiler error stating that " '1' is not a -- value/variable of final_class.instance.instance.instance.generic_class." How do I tell that procedure to accept a certain type for that -- param? This is the proc. that I want all children to inherit generically. ... end Dialog; --------------------------- -- Driver procedure body --------------------------- with Final_Class procedure Driver is begin --how do I call a procedure from Final_Class from within here? end Driver; I know this may be ugly, but I just want to know if it's possible...or realistic. I appreciate any info on this situation. -- Christopher Campise, Associate Engineer Amherst Systems Inc. 30 Wilson Road Buffalo, NY 14221 phone: (716)631-0610 x384 E-Mail: crc@amherst.com WWW: www.amherst.com