Re: WebView question
Re: WebView question
- Subject: Re: WebView question
- From: glenn andreas <email@hidden>
- Date: Thu, 9 Feb 2006 18:08:18 -0600
On Feb 9, 2006, at 4:10 PM, Matt Mashyna wrote:
I have a window with a WebView in it. When the app loads I can tell
it's controller to load it and open a url in
applicationDidFinishLaunching.
Works fine. I can change to that window any time and click links
etc. but I don't want to open this window at launch time. The app
is a sort of wizard that goes through steps and has a few threads
doing things like connecting to http and ftp servers. When the
steps are complete, I want to pop up the window with the WebView
and tell it to load a specific URL that might not be known until
right before it's needed to load. When I try to load a URL later --
one that works fine when done in applicationDidFinishLaunching --
nothing happens. I don't get an exception.
When I try opening a URL from another thread it also fails quietly.
Something is wrong with the way I want to load it. Do you have to
make calls to webkit from the main thread ?
Absolutely - UI needs to always be done from the main thread.
One other thing to look into is how are you displaying the window
housing the WebView - if it is run in a modal run loop (e.g.,
"runModalForWindow", etc..), there won't be any time given to the
WebView to finish loading the URL content. You'll need to break that
modal loop into an explicit begin/run (like shown in runModalSession)
and give time to the default run loop...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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