Re: IB calls Java method?
Re: IB calls Java method?
- Subject: Re: IB calls Java method?
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 17 Jul 2008 10:40:32 -0700
On Thu, Jul 17, 2008 at 10:16 AM, ahmed nabel <email@hidden> wrote:
>
> I want to use Interface Builder UI components to call Java methods (in their corresponding Java files). Is this possible? How?
>
> Please see my post on the Java mailing post:
>
> http://lists.apple.com/archives/java-dev/2008/Jul/msg00135.html
>
> Can anyone please refer to specific steps on how to do this? Thank you.
Again you really don't want to do this. IMHO it will be more work then
it is worth (if you are just trying to avoid learning Objective-C/C
and Foundation, etc. which you imply in your prior post). Using a Java
core for compute / application logic isn't to bad to do but attempting
to more directly connect Java objects to Cocoa objects defined in a
nib is non-trivial.
You will need Objective-C objects (or some other directly supported
language) to be the targets of the messages coming from your Cocoa UI
views and those could interact with Java objects running in a JVM
hosted by your Cocoa application. You could do some fancy things with
message forwarding thanks to how Objective-C and Cocoa work to
generify this but...
You will need to use JNI (or JNA) to do this since the Cocoa Bridge is
dead at this point.
(Not sure JNA will help going from Objective-C/C to Java)
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden