• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with Java Applet in WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: You can give propertyListFromData: a C string!
  • Next by Date: RE: [Q] omissible method declaration in interface file
  • Previous by thread: Re: You can give propertyListFromData: a C string!
  • Next by thread: Newbie Q : automatic creating & saving
  • Index(es):
    • Date
    • Thread