From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: JGNAT and Null references
Date: Thu, 01 Mar 2001 18:10:21 GMT
Date: 2001-03-01T18:10:21+00:00 [thread overview]
Message-ID: <3A9E9102.F1E5C294@worldnet.att.net> (raw)
In-Reply-To: 3A9E77D4.D40FEAA@earthlink.net
"Marc A. Criley" wrote:
>
> When this class is run through JGNAT's jvm2ada, the Ada equivalent of
> that method is:
>
> procedure addTab (This : access Typ;
> P1_String : access java.lang.String.Typ'Class;
> P2_Icon : access javax.swing.Icon.Typ'Class;
> P3_Component : access java.awt.Component.Typ'Class;
> P4_String : access java.lang.String.Typ'Class);
>
> Okay, so far so good.
>
> In Java, if I don't have an icon to accompany this tab pane, I can just
> supply that parameter with a null:
>
> jtp.addTab("My title", null, a_component, "a_tool_tip");
>
> Attempting this in Ada:
>
> AddTab(Jtp, +"My title", null, A_Component, +"a_tool_tip");
>
> generates an error when compiled:
>
> null cannot be of an anonymous access type
This is easily handled by defining a constant value of a null access
type.
type Icon_Access is Access all javax.swing.Icon.Typ'Class;
Null_Icon : constant Icon_Access := Null;
Jim Rogers
Colorad Springs, Colorado USA
next prev parent reply other threads:[~2001-03-01 18:10 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 [this message]
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
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