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,e092a534485c39a1 X-Google-Attributes: gid103376,public From: "Paul Hussein" Subject: Re: What is the best Xwindow, window98 program to use frames withada? Date: 1999/12/12 Message-ID: <830dk5$nbp$1@lure.pipex.net>#1/1 X-Deja-AN: 559711216 References: <9BBB0C9AF506D311A68E00902745A537BB86C3@fsxqpz04.usafa.af.mil> <384FA59B.3234C478@acenet.com.au> <82p3sp$cds$1@lure.pipex.net> <38524EC0.3283808A@acenet.com.au> <82tn88$n2k$1@nnrp1.deja.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@uk.uu.net X-Trace: lure.pipex.net 945011141 23929 194.69.100.169 (12 Dec 1999 15:05:41 GMT) Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom X-MSMail-Priority: Normal NNTP-Posting-Date: 12 Dec 1999 15:05:41 GMT Newsgroups: comp.lang.ada Date: 1999-12-12T15:05:41+00:00 List-Id: It really depends on what you want to do. I would go for writing the Ada part and the Java GUI part as separately as possible, essentially writing the GUI as a stand-alone app, and the Ada as a stand-alone app. Try to keep the message passing bit between the two as simple as possible. I think the previous posts were assuming a very tight integration design and code-wise, and I would say that would be a very dangerous way to go. This would require good tool support or a lot of code on your side. I would try to make the interfacing as simple as possible. You could say pass strings. Then you would need only a send message, and get/receive message interface. You could then take the interfacing part that provides the mechanism for passing these messages and implement it in JNI, sockets, shared mem, whatever. Tight integration with a tool would be a mistake. Write it as much as possible independant of the tool, and if you could do it without the tool, so much the better. You coukd also reimplement the GUI in anything else relatively easily, ( e.g. Win32, X ). I managed to get an Ada main program to kick off a Java class in its own thread running within a JVM and pass messages between the two, and it did not take that long. All that is needed is native thread support in the Ada compiler and the JVM, and no overlapping symbols in the java library and Ada library. Have you looked at using a GUI tool like BX Pro that can generate C, Java, C++ for Win32 X or JDK. You may be able to create a GUI for most platforms using X and C/C++ and for windows using Win32 and C/C++. If you write standard interface code, when you generate the code, it should all work. Ed Falis wrote in message news:82tn88$n2k$1@nnrp1.deja.com... > In article <38524EC0.3283808A@acenet.com.au>, > Geoff Bull wrote: > > > Apart from the obviously difficulties that it's bindiings don't > > talk JNI, a lot of Java classes are only useful once you inherit > > from them. Thus you need to write Java code to do this inheritance > > and the call native methods. However, you'll find that most such > > methods are trivial and since you are writting some Java, you may > > as well write a bit more (easier than mucking around with the > > binding generator). Soon you find you whole GUI is written > > in Java. This is not necessarily a bad thing, I happen to think > > that is one of the few things for which Java is particularly good. > > I have worked out a way to avoid writing any Java code (just have > > the native code generate the required Java byte code) but I haven't > > got around to implementing this yet. > > The approach I've used with AdaJNI is that since I have a copy of Visual Age, > I use its "visual composition editor" to create the UI, export the event > hooks and produce it as a Java Bean. Then I have (had, actually - it's been > a while) a small bean launcher package written in native Ada code to load it > in as part of the setup of the application. > > Since the most common stuff you wind up subclassing is gui classes, this was > a way to minimize the amount of Java code to write. > > I've used a version of AdaJNI that supports 1.2 - I don't think it's released > yet, though. > > - Ed > > > > Sent via Deja.com http://www.deja.com/ > Before you buy.