• 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
Re: How do I use a WebView in a modal dialog?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I use a WebView in a modal dialog?


  • Subject: Re: How do I use a WebView in a modal dialog?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 25 Apr 2008 21:27:02 +0200


Le 25 avr. 08 à 21:00, David Sinclair a écrit :


On Apr 25, 2008, at 08:35:53, David Springer wrote:

Folks,

How can I use a WebView in a modal dialog? I understand that WebViews
don't work in the modal runloop mode, so is there a way to fake this?
Run my own nextEventMatchingMask: loop (I have tried this with very
limited success)? Run the window containing the WebView in a separate
thread with its own run loop? Get rid of WebView altogether and go
straight to WebFrame (this sounds hard)?


Tickle the runloop.  See my blog post about this:

<http://www.dejal.com/blog/2007/01/cocoa-topics-case-modal-webview>

--


Not good.
There is not blocking call in your loop, so the loop will keep running consuming all the processor.


Instead of your call, you can use

[[NSRunLoop currentLoop] runMode:NSDefaultRunLoopMode beforeDate: [NSDate distantFuture]];

The event loop is a runloop data source, so any ui event will wake up the source and make this method returns, and so you can block the run loop and tell him to wait that something append.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How do I use a WebView in a modal dialog? (From: "David Springer" <email@hidden>)
 >Re: How do I use a WebView in a modal dialog? (From: David Sinclair <email@hidden>)

  • Prev by Date: Re: [solved] How to catch all mouse clicking (or avoid multiple click filtering in startTrackingAt)
  • Next by Date: Re: Weird Problem With CGImage
  • Previous by thread: Re: How do I use a WebView in a modal dialog?
  • Next by thread: [ANN] Media App Developer position (Northern NJ)
  • Index(es):
    • Date
    • Thread