On Feb 13, 2008, at 3:24 PM, Peter Rootham-Smith wrote:
At Leopard a considerable amount of deprecation has happened to
Apple's NSArray and NSSpeechSynthesizer classes. I would really
like to see the Javadoc for these classes to understand things.
Before someone says RTFM I have been on a long fruitless search
through Apple's site for TFM. NSArray is referred to in the
WebObjects document but the reference is out of date.
NSArray and NSSpeechSynthesizer are both classes that are part of
"Java Bridge". These are Objective-C classes that are bridged to Java
objects, but have been deprecated in Leopard, and not present in 64-
bit VMs.
The supported way to access this functionality is to write JNI code
that calls these native frameworks, and compile a universal binary
that contains slices for ppc, i386, and x86_64. Our Java JNI
application sample should be able to help you get started.
Please note that calling into Cocoa frameworks from the Java VM means
that you will have to setup and tear down autorelease pools, catch
NSExceptions, and -performSelectorOnMainThread, from native Objective-
C code. This is not for the faint of heart. Most AppKit APIs are
designed to be called from the main thread (thread 0), in much the
same way Swing components should only be called from the Event
Dispatch Thread (EDT). Of course - because life is hard - arbitrary
client code cannot be run on thread 0, because it has to service the
application's runloop, so you will have to bounce back and forth
between multiple threads to get information back and forth to the Java
VM.
I hope this helps clarify where things stand, even if it is not
exactly comforting.
Mike Swingler
Java Frameworks Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden