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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6fdabd42b1cb773b X-Google-Attributes: gid103376,public From: falis@ma.aonix.com Subject: Re: GUI in Ada Date: 1998/09/18 Message-ID: <1103_906130799@DZOG-CHEN>#1/1 X-Deja-AN: 392426687 Sender: news@sd.aonix.com (USENET News Admin @flash) X-Nntp-Posting-Host: 192.157.137.14 References: <6tl1k9$acd$1@emu.cs.rmit.edu.au> <360196CB.9EC3F20F@altoetting-online.de> <6ttqcp$ovu$1@nnrp1.dejanews.com> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Date: 1998-09-18T00:00:00+00:00 List-Id: I've been working recently with Ainslie Software's AdaJNI (www.ainslie-software.com), that provides bindings to JDK 1.1.6 and Swing 1.0.2, as well as a binding generator for arbitrary Java classes. AdaJNI works with GNAT and ObjectAda (and probably without too much trouble with other compilers). The idea is that the application runs as native Ada code and fires up a JVM for the UI and for any other Java parts one might wish to use. So far, I've been able to set up connections to Marimba's Bongo GUI builder (www.marimba.com), which uses the old JDK 1.0 event handling model (requires interpreting the events in your Ada event handler by mapping widget names to enumeration values, done by a simple generic I've written). Bongo is pretty rich as a GUI builder, and is very easy to use, but it's product future is uncertain. Note that despite the 1.0 event handling, you can still use JDK 1.1.x or 1.2 beta. This week, I set up a similar harness for IBM's VisualAge for Java 2.0. Still working out some generalizations in the harness. VA is a truly impressive IDE (http://www.software.ibm.com/ad/vajava/), for which you can download a free trial. It allows you to visually build and compose arbitrary Java beans (including non-visual ones incorporating application logic). This allows UI specific manipulations that you may not want to have your Ada code deal with to stay encapsulated in the GUI part. It also supports Swing. The harness I put together should allow arbitrary Java beans, not just those from VA, to be interfaced via AdaJNI. I've been using it effectively with JDK 1.2 beta 4. The advantage fo the bean approach is that the interface to the GUI or other java code is much better localized than for using Bongo, as the JDK 1.1+ event model is used. Although I haven't had the opportunity to test any of this with UNIX compilers or GNAT, there's no theoretical reason that the applications shouldn't be completely portable, JVM implementation differences factored. Just another approach to the problem. - Ed Falis Aonix