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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e1dc35385e37d032,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-22 02:35:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!not-for-mail From: "Bobby D. Bryant" Newsgroups: comp.lang.ada Subject: Instantiation problem in generic. Date: Tue, 22 Jul 2003 03:33:51 -0600 Organization: dis- Message-ID: NNTP-Posting-Host: dial-104-10.ots.utexas.edu Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: geraldo.cc.utexas.edu 1058866476 6395 128.83.176.106 (22 Jul 2003 09:34:36 GMT) X-Complaints-To: abuse@utexas.edu NNTP-Posting-Date: Tue, 22 Jul 2003 09:34:36 +0000 (UTC) User-Agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!) Xref: archiver1.google.com comp.lang.ada:40623 Date: 2003-07-22T03:33:51-06:00 List-Id: Am I interpreting this GNAT message correctly? (the compiler is GNAT 3.15p) For the code in the body of a generic library package (pardon the wrapping) - -- Set up callbacks for the window manager's decorations: GTK_Stuff.Widget_Callback_Returning_Boolean.Connect (Widget => Histogram_Window, Name => "delete_event", Marsh => GTK_Stuff.Widget_Callback_Returning_Boolean.To_Marshaller (Close_Histogram_Window_Fn'Access)); -- GTK_Stuff.Widget_Callback.Connect (Widget => Histogram_Window, Name => "destroy", Marsh => GTK_Stuff.Widget_Callback.To_Marshaller (Close_Histogram_Window'Access)); I get error messages when compiling the package body (line numbers off due to Usenet wrapping) - 746. Marsh => GTK_Stuff.Widget_Callback_Returning_Boolean.To_Marshaller (Close_Histogram_Window_Fn'Access)); >>> access type must not be outside generic body 750. Marsh => GTK_Stuff.Widget_Callback.To_Marshaller (Close_Histogram_Window'Access)); >>> access type must not be outside generic body The Close_Histogram_* subprograms are defined within the body of the generic package, so I don't understand what the compiler is complaining about. If I put declarations in the package spec, whether in the public area or the private area, the message is suppressed when compiling the package, but it still occurs when compiling the program that instantiates it. Any suggestions? -- Bobby Bryant Austin, Texas