Re: NSAppleEventManager in Java
Re: NSAppleEventManager in Java
- Subject: Re: NSAppleEventManager in Java
- From: Steve Roy <email@hidden>
- Date: Tue, 18 Mar 2003 08:39:53 -0500
email@hidden (Chris Backas) wrote:
>
I haven't investigated it yet, but I'm fairly certain that I read that the
>
release of Java 1.4.1 added at least basic Apple Event listening capabilities
to
>
Java code.
Yes, Apple's Java VM has always included the ability to handle the four required
Apple events. However, the 'odoc' and 'oapp' events were broken in MRJ 3.0 and
they are also broken in the brand new 1.4.1 JVM. By "broken" I mean that those
two events are never received when the application is launched, although the
'odoc' event is correctly received while the application is running.
So all this to say that I'm looking for a way 1) to get around those two broken
implementations and 2) to maybe implement support for any Apple event. In the
case of the 1.4.1 VM, I'm trying to find out if I can do it with Cocoa.
>
Checking through Java Browser on my machine I see
>
com.apple.cocoa.foundation.NSAppleScript and
>
com.apple.cocoa.foundation.NSAppleEventDescriptor
I know about those but they don't provide an API to register a handler for
specific Apple events. NSAppleScript is used to execute textual AppleScripts,
and NSAppleEventDescriptor is what is received by an event handler. In
Cocoa-ObjC, NSAppleEventManager has the method
setEventHandler:andSelector:forEventClass:andEventID: to do what I want. The
$100 question is, why isn't it available in Cocoa-Java?
Steve
--
Steve Roy <email@hidden>
http://homepage.mac.com/sroy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.