Juerg,
I am running java from a native application, within which I invoke
the virtual machine through JNI.
I recently started experimenting with using SWT inside this native
app, which has worked pretty well. But when trying to embed AWT
components inside a SWT shell, I get weird exceptions since
updating to DP1:
Stacktrace: java.lang.RuntimeException: Non-Java exception raised,
not handled! (Original problem: *** +[NSView
bindNSWindowToHIView:hiView:]: selector not recognized)
at apple.awt.CHIViewEmbeddedFrame._nativeCreateHIView(Native Method)
at apple.awt.CHIViewEmbeddedFrame.<init>
(CHIViewEmbeddedFrame.java:28)
...
The problem here is that you are likely using WebKit to display a
WebView somewhere in your application, or you are using the SWT
Browser widget. If WebKit loads first, the SWT_AWT glue code will
fail due to a naming conflict in the Objective-C part of the
implementation. The AWT Carbon embedding code is based on HIWebView
from WebKit, and I incorrectly used some classes with the same name
but different interfaces.
This is a bug that I recently fixed -- the short term fix is to not
use WebKit and AWT embedding features of SWT at the same time.
Before embedding sort of worked, except for a crash when closing
windows.
I also fixed this as well. It's a separate problem.
Look for these fixes to show up in an upcoming release.
http://lists.apple.com/archives/java-dev//2006/Sep/msg00083.html
With the difference that there, the selector is called on
HIViewAdapter, not NSView.
The problem mentioned in the reply from Krista Miller is the same
bug. The original issue with NSEvent is unrelated.
Hope that helps, at least in the short term.
Scott
------------------
Scott Kovatch
Apple Computer
Java Runtime Classes
Cleveland Hts, OH
email@hidden
I am Scott Kovatch, and I approved this message.