Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: communication between Applications



On Friday, April 2, 2004, at 03:53 PM, Tom Eager wrote:

The one example that Apple gives (AESendandReceive) for AppleEvents will not work in 1.4.x. because it uses JDirect which is only supported (and available) in 1.3.1, not 1.4.x. Except for the JDirect part, the native methods it calls are appropriate for 1.4.2, but instead of using JDirect you will need to use JNI.

I have thus far created 3 simple JNIs to emulate MJR classes. I think that I have 3 more JNI's to create. The trickiest will be MethodClosure.

I thought this should have been easier because the OS X documents recommend AppleEvents.

JNI should work. I've done it 1.4.1 with JNIDirect a JDirect-like JNI based on the fly compile thing. Caching I have to look at sometime probably to avoid the compiling but so far it hasn't seemed to be a major factor in any timing-critical areas. But it works including as a AppleEvent clie
My application I think goes a little farther in implementing an AppleEvent client/server than I think the sample code did, You can pass text commands, simple method invocations where there are suitable equivalents for the Java and AppleEvent types, and you can pass java serialized objects although been a while since I tested that one and no 'normal' usage of it yet. If you found the JDirect readable you probably would be all right figuring out my code.
My Combined application and JNIDirect can be found off my signature home page below or probably check with off-list if you're interested in more info.
There is the Cocoa/Java stuff as well but I haven't looked at it enough to say a lot about it. It has sort of sounded like the straight AppleEvent support is more limited than the AppleScript support. But thats vaguely remembered hearsay.

Mike Hall <mikehall at spacestar dot net>
<http://www.spacestar.net/users/mikehall>
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: communication between Applications (From: Tom Eager <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.