Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Re: Mac port: Status Update

Besides, going through all the voodoo to get the Obj-C code to talk to Java
through JNI (and do it better than Apple can) would take a pretty large
undertaking that would offset any gains we get by using the Cocoa API's.

The major difference is that the JavaBridge is primarily dynamic code, i.e. it's generated through a mapping declaration (from what I understand). So it leverages reflection most of the time. And it's two-way. A JNI mapping would be just a static wrapper around the ObjC classes with some hooks for doing NSNotificationCenter and NSEvent callbacks.

We wouldn't have to marshal objects back and forth between Java/ObjC, at best we'd have to keep pointer references to ObjC classes, which is effectively what the SWT Win32 port is doing in places.

Anyhow, I've been working in my spare time at writing a JNI wrapper around the Foundation & AppKit classes you used in your BlackMoon example... to see if it'll exhibit the same crash behavior... we'll see how far I get. <grin>

Cheers
Stu



Back to the top