Problems with Java Applet in WebView
Problems with Java Applet in WebView
- Subject: Problems with Java Applet in WebView
- From: Moray Taylor <email@hidden>
- Date: Sat, 27 May 2006 20:27:24 +0100
Hi,
I'm using the following code to load a HTML file into a WebKit WebView.
[[WebHistory optionalSharedHistory] removeAllItems];
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSString * path = [[self pageView] htmlPath];
NSURL * url = [[NSURL alloc] initFileURLWithPath:path];
NSURLRequest * ur = [[NSURLRequest alloc] initWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60];
[[[self previewView] mainFrame] loadRequest:ur];
This works perfectly, until the HTML has a Java Applet embedded, in
this case it only works the first time the above code is run, the 2nd
time it's run, I get this error
java.lang.NullPointerException
at sun.plugin.viewer.WebKitPluginObject.getParameter
(WebKitPluginObject.java:770)
at sun.plugin.viewer.WebKitPluginObject.setWindow
(WebKitPluginObject.java:427)
My code works great for all other HTML, it's just when it has an
applet I have problems, other embedded content like Flash or
Quicktime work great.
Has anyone else experienced this issue? Any ideas?
Cheers
Moray
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden