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 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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: I do not understand this error... Date: Mon, 8 Feb 2016 22:25:25 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <0528d7a8-773d-44b0-8f0a-e9aa48867443@googlegroups.com> <8778e70b-81e1-4dcc-8ecb-8bcaceb74b57@googlegroups.com> <4b48fda1-7322-4960-b45c-6b7503cab9d9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 9 Feb 2016 05:22:33 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="17805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZMIoeIYSjdfftICJuBRPb21AlMfQfGY0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <4b48fda1-7322-4960-b45c-6b7503cab9d9@googlegroups.com> X-Mozilla-News-Host: news://freenews.netfront.net Cancel-Lock: sha1:8thYS3KqJ7cMzfzx0ALjMb4mekQ= Xref: news.eternal-september.org comp.lang.ada:29453 Date: 2016-02-08T22:25:25-07:00 List-Id: On 02/08/2016 04:39 PM, John Smith wrote: > > I tried to "with" the following package: > http://pastebin.com/ghd6kjZP > > But I got the following errors: > gtk_hello_world.adb:38:03: "Return_Handlers" is not visible > gtk_hello_world.adb:38:03: non-visible declaration at handler_package.ads:11 > gtk_hello_world.adb:39:03: "Handlers" is not visible > gtk_hello_world.adb:39:03: non-visible declaration at handler_package.ads:10 Handlers and Return_Handlers are inside Handler_Package, and have to be referenced just like anything else inside a pkg. Just as you say Gtk.Widget.Gtk_Widget_Record, you should say Handler_Package.Handlers. But presumably the callbacks are still in your main-program subprogram, which is not library level, so this won't help you by itself. Typically I've put everything dealing with GtkAda in the same pkg, except the call to Gtk.Main.Main. You can look at the Mine Detector game for an example. https://pragmada.x10hosting.com/mindet.html -- Jeff Carter "When danger reared its ugly head, he bravely turned his tail and fled." Monty Python and the Holy Grail 60