comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcqnet@earthlink.net>
Subject: Re: JGNAT and Null references
Date: Mon, 05 Mar 2001 13:05:27 GMT
Date: 2001-03-05T13:05:27+00:00	[thread overview]
Message-ID: <3AA3815B.11B1A073@earthlink.net> (raw)
In-Reply-To: Q0io6.3825$7e6.1514539@homer.alpha.net

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



  reply	other threads:[~2001-03-05 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 17:23 JGNAT and Null references Marc A. Criley
2001-03-01 18:10 ` James Rogers
2001-03-02 19:27 ` Stephen Leake
2001-03-03 21:17   ` Marc A. Criley
2001-03-04  2:46     ` Randy Brukardt
2001-03-05 13:05       ` Marc A. Criley [this message]
2001-03-05 16:28         ` tmoran
2001-03-06  0:57           ` Marc A. Criley
2001-03-05 18:11         ` Randy Brukardt
2001-03-05 20:44         ` Florian Weimer
2001-03-07 16:02       ` Tucker Taft
replies disabled

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