comp.lang.ada
 help / color / mirror / Atom feed
From: hreba <hreba@terra.com.br>
Subject: Re: Generic Library Units?
Date: Fri, 17 Oct 2014 09:57:59 -0300
Date: 2014-10-17T09:57:59-03:00	[thread overview]
Message-ID: <caci2qFhrueU1@mid.individual.net> (raw)
In-Reply-To: <58d11e86-8f29-4f49-ab56-ab282a59a560@googlegroups.com>

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

      reply	other threads:[~2014-10-17 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 14:38 Generic Library Units? hreba
2014-10-12 15:47 ` Dmitry A. Kazakov
2014-10-12 22:39   ` hreba
2014-10-13  7:45     ` Dmitry A. Kazakov
2014-10-15  0:29       ` hreba
2014-10-15  7:21         ` Dmitry A. Kazakov
2014-10-16  1:21           ` hreba
2014-10-16  7:04             ` Dmitry A. Kazakov
2014-10-16  7:54             ` Simon Wright
2014-10-17 12:46               ` hreba
2014-10-16 10:36           ` AdaMagica
2014-10-17 12:57             ` hreba [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox