• 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
WebView doesn't play nice with modal session?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebView doesn't play nice with modal session?


  • Subject: WebView doesn't play nice with modal session?
  • From: "Laurent Daudelin" <email@hidden>
  • Date: Mon, 22 Dec 2003 18:21:20 -0500

Is there any known problem in trying to use a WebView inside an NSPanel that
is displayed and managed using "NSApp runModalForWindow:"?

I have a nib file with one NSPanel and one WebView in it. I also have a text
field with the action 'takeStringURLFrom:' wired to the WebView. When I run
the interface from within InterfaceBuilder, everything works properly.

However, from within my application, when I use [NSApp
runModalForWindow:myPanel], as soon as I hit return after typing a URL in
the text field, my resourceLoadDelegate receives the following error in
'webView:resource:didFailLoadingWithError:fromDataSource:':

NSError "cancelled" Domain=NSURLErrorDomain Code=-999 UserInfo={
NSErrorFailingURLStringKey = "http://www.apple.com";;
NSLocalizedDescription = cancelled;
}

When looking the error code, -999 = NSURLErrorCancelled

NSURLErrorCancelled:
"Returned when an asynchronous load is canceled. A Web Kit framework
delegate will receive this error when it performs a cancel operation on a
loading resource. Note that an NSURLConnection or NSURLDownload delegate
will not receive this error if the download is canceled."

What does that mean? I don't have any method in my delegate that would
cancel the request. Actually, when I send the '[[myWebView mainFrame]
loadRequest:myRequest]' message, I don't send any other message to the
webview main frame. I just call '[NSApp runModalForWindow:myPanel]', so I
don't understand the meaning of the error. I checked the URLRequest and it
seems fine.

Anybody has any idea?

Thanks in advance!

-Laurent.
--
========================================================================
Laurent Daudelin Developer, Multifamily, ESO, Fannie Mae
mailto:email@hidden Washington, DC, USA
************************ Usual disclaimers apply ***********************
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSKeyedArchiver performance
  • Next by Date: Re: question about retain/release
  • Previous by thread: Re: NSKeyedArchiver performance
  • Next by thread: Pascal porting?
  • Index(es):
    • Date
    • Thread