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,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Generic Library Units? Date: Tue, 14 Oct 2014 21:29:16 -0300 Message-ID: References: <10ir7anot1ujj$.kcl1b5ynppz8.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net dWkq0JC2T1hzdNHYED6TVwDcWlZd/ZDEhA6a+aCiNby+evzIiT Cancel-Lock: sha1:Jc/sIiShDCIA3XlzxKUgB33GwJw= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:22487 Date: 2014-10-14T21:29:16-03:00 List-Id: On 10/13/2014 04:45 AM, Dmitry A. Kazakov wrote: > > with Gui; > with GuiGtk.SimpleGad; > with Gui.SimpleGad; > package MainAux is > package Toolkit is new GuiGtk; > package SimpleGad is new Toolkit.SimpleGad; > package GuiTK is new Gui (Toolkit, SimpleGad); > end MainAux; > Ok, did that too, and the error message disappeared. Now in the package body of Gui.SimpleGad I have function Get (gad: BoolGadget) return boolean is begin return TKSG.GetBool (gad.widget.all); end Get; and get the error message gui-simplegad.adb:78:39: expected type "GuiGtk.GadWidgets" defined at guigtk.ads:38 gui-simplegad.adb:78:39: found type "TK.GadWidgets" defined at guigtk.ads:38, instance at gui.ads:10 So the compiler isn't aware that GuiGtk is the actual value to the formal package TK. How do I tell him? ( The Gui package header is generic with package TK is new GuiGtk(<>); -- this is gui.ads:10 with package TKSG is new GuiGtk.SimpleGad; package Gui is ... ) -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil