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,5b27ffedba54a4a2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-05 05:06:08 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3AA3815B.11B1A073@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: JGNAT and Null references References: <3A9E77D4.D40FEAA@earthlink.net> <3AA151BF.C9193700@earthlink.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 05 Mar 2001 13:05:27 GMT NNTP-Posting-Host: 158.252.122.163 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 983797527 158.252.122.163 (Mon, 05 Mar 2001 05:05:27 PST) NNTP-Posting-Date: Mon, 05 Mar 2001 05:05:27 PST Xref: supernews.google.com comp.lang.ada:5427 Date: 2001-03-05T13:05:27+00:00 List-Id: Randy Brukardt wrote: > > Marc A. Criley wrote in message <3AA151BF.C9193700@earthlink.net>... > >Uh...it did work. Cleared up the problem just fine. That it works > >doesn't totally sit well with me, since my purist mental picture of a > >"constant" involves only a value, and not storage. Nonetheless, > > > > Null_Icon : constant Javax.swing.TabbedPanel.ref := null; > > > >was accepted by the AddTab procedure call. > > But does it run? The RM 4.6(49) says that an access parameter cannot be > null, and must raise Constraint_Error. If it does run, you're using a > compiler bug (or "feature"); your code won't be portable... > > Randy. Oh yes, it does run. As I'm not a supported user of JGNAT, having access only to the public 1.1p version, I can't ask ACT about this. My question, though, would be: If an access parameter cannot be null, how am I supposed to pass a null argument to a Java method, given the way jvm2ada generates the Ada binding? Is the present behavior a bug? Is it a JGNAT-specific extension that perhaps ought to be wrapped in the Extensions_Allowed behavior? As for portability, unless there's a standard approach for defining Ada bindings to Java classes and methods, I suspect I'm strongly wrapped up in JGNAT-specificity anyways. Marc