| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
In AppleScript Studio, one can use the 'call method' command to call any methodAndyT (lordpixel - the cat who walks through walls)
of any object in Objective-C, and not just for Cocoa classes but any code, even
Objective-C code you have written yourself. For example:
call method "sharedWorkspace" of class "NSWorkspace"
call method "numberWithInt:" of class "NSNumber" with parameter 10
It would be wonderful if there was something equivalent in Java. JNI can do
this, but you have to write a dylib, load it, and all this fun stuff. Currently
we have the Cocoa-Java bridge, but it is limited to the classes that have been
wrapped, and not all of them have been, and specialized APIs like the Address
Book API or the NSAppleEventManager class are not available through Cocoa-Java.
I don't know why bridging from AppleScript to Objective-C is a matter of one
command, when in Java it's a matter of a set of classes. Maybe it's because the
Cocoa-Java bridge wraps classes instead of just implementing a way to call them?
Steve
--
Steve Roy <email@hidden>
Personal homepage: <http://homepage.mac.com/sroy>
Projects homepage: <http://www.roydesign.net>
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.