Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SWT_AWT on 1.5.0_07 (DP1), selector not recognized exceptions



Hi Scott,

Thank you for your explanations. I think what happens is that the application I am developing the plugin for (Adobe Illustrator) is using the WebView somewhere, even before my plugin is loaded. So at the moment there seems to be no way for me to work around the problem.

I guess the fixes will make it into DP2, right?

Can you already tell roughly when to expect the upcoming release?

Best,

Juerg

On 29 Dec 2006, at 17:24, Scott Kovatch wrote:

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.


_______________________________________________ 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

This email sent to email@hidden
References: 
 >SWT_AWT on 1.5.0_07 (DP1), selector not recognized exceptions (From: Juerg Lehni <email@hidden>)
 >Re: SWT_AWT on 1.5.0_07 (DP1), selector not recognized exceptions (From: Matt Drance <email@hidden>)
 >Re: SWT_AWT on 1.5.0_07 (DP1), selector not recognized exceptions (From: Juerg Lehni <email@hidden>)
 >Re: SWT_AWT on 1.5.0_07 (DP1), selector not recognized exceptions (From: Scott Kovatch <email@hidden>)



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.