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,844e8b7133f8d766 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 05:42:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3AC865C2.763B1A90@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: Bizarre JGNAT things References: <9a5kqt$cnu$1@news.netmar.com> <3ac7598d_2@news3.prserv.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 02 Apr 2001 12:40:35 GMT NNTP-Posting-Host: 63.178.185.119 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 986215235 63.178.185.119 (Mon, 02 Apr 2001 05:40:35 PDT) NNTP-Posting-Date: Mon, 02 Apr 2001 05:40:35 PDT Xref: supernews.google.com comp.lang.ada:6329 Date: 2001-04-02T12:40:35+00:00 List-Id: Andrzej Lewandowski wrote: > > wrote in message news:9a5kqt$cnu$1@news.netmar.com... > > Hello! > > The most bizarre thing is that happens to two files only - > > com-sun-java-swing-plaf-motif-MotifLookAndFeel.ads and > > com-sun-java-swing-plaf-windows-WindowsLookAndFeel.ads. All other files, > > including ones with almost identical structure, compile OK, in the same > > directory, with the same settings. The extremely similar > > javax-swing-plaf-metal-MetalLookAndFeel.ads compiles OK also. > > > > Do I do anything wrong? > > > > Yes. Wrong is that you are using JGNAT. I gave up after many > attempts. > Curious. I've got tables, trees, pop up menus, socket communications, and so on, all written using JGNAT and working quite nicely. Granted, I would like to see a a post-1.1p release that hopefully smoothed some of the product's rough edges, but I find it quite usable. There's one critical aspect of JGNAT that a prospective user _must_ understand. If one tries to write code with JGNAT using the same "style" one does when writing typical Ada programs, that will likely work only if you're writing "isolated" code, meaning, little or no interaction with the JDK class library. If you're going to interface to JDK classes, as I've been doing, one must understand _and_conform_ (at least to some extent) with the Java approach. The JDK is heavily based on inheritance and implementing interfaces, therefore your JGNAT compiled Ada code also has to employ inheritance and polymorphism much more than is typically required of Ada programs. My approach has been to write the core code using the standard Ada idioms, and then adapting to the Java way around the fringes. This is in contrast to writing all the code in a Java idiom, and employing "with type" and coding up my own interfaces and such. I just leave that latter stuff to jvm2ada. Marc A. Criley