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: Fri, 17 Oct 2014 09:57:59 -0300 Message-ID: References: <10ir7anot1ujj$.kcl1b5ynppz8.dlg@40tude.net> <1e3dumb4ql0xb$.1reo7fz5y3vyl.dlg@40tude.net> <58d11e86-8f29-4f49-ab56-ab282a59a560@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Z6MKeQIFULkHGYyOq3BCgAhWVJmDZctlLhuDZqiMUO+FuDDCDf Cancel-Lock: sha1:nSqVPw+JITq9ZD3e8BEBpHVVrf0= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <58d11e86-8f29-4f49-ab56-ab282a59a560@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:22546 Date: 2014-10-17T09:57:59-03:00 List-Id: On 10/16/2014 07:36 AM, AdaMagica wrote: > Since there is no complete source, I can only guess. > >> generic >> with package TK is new GuiGtk(<>); -- this is gui.ads:10 >> -- with package TKSG is new GuiGtk.SimpleGad; > -- try this instead: > with package TKSG is new TK.SimpleGad; >> package Gui is > > GuiGtk is a generic, which seems to have a generic subpackage or child SimpleGad. > > You first instantiate GuiGtk, instance is called TK. This implicitly creates the generic TK.SimpleGad (from GuiGtk.SimpleGad), which you can then instantiate as TKSG. > Finally got it to work. With a package SimpleGtk instead of the child package GuiGtk.SimpleGad. My structure is now generic with package TK is new GuiGtk(<>); with package TKSG is new SimpleGtk(TK); package Gui is ... end Gui; generic package Gui.SimpleGad is ... end Gui.SimpleGad; generic package GuiGtk is ... end GuiGtk; generic with package TK is new GuiGtk(<>); package SimpleGtk is ... end SimpleGtk; package MainAux is package Toolkit is new GuiGtk; package ToolkitSG is new SimpleGtk(Toolkit); package GuiTK is new Gui(Toolkit, ToolkitSG); ... end MainAux; Thanks to all for your help. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil