• 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: Faking out modality with validateMenuItem:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faking out modality with validateMenuItem:


  • Subject: Re: Faking out modality with validateMenuItem:
  • From: glenn andreas <email@hidden>
  • Date: Tue, 5 Dec 2006 09:36:36 -0600


On Dec 5, 2006, at 9:24 AM, Jeffrey Johnson wrote:

Alas, NSURLConnection is broken for modality- you (or your WebView) can make outbound NSURLConnections while modal, but as long as modality is "on", your connection:didRecieveXXX callbacks will never be called, even if the delegate to handle those requests is the modal window- apparently the modal filter discards the incoming results. This has been known about for at least three years, by searching the list archives.

I believe the problem is NSURLConnection runs its receiving in run loop modes that don't include the modal one. I've used WebViews in modal dialogs by writing a custom modal session - so instead of doing runModalForWindow, use beginModalSessionForWindow: and inside that loop add:


[[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow:0.1]];


So the problem has an easy solution that doesn't require hacking out menu validation at all...






Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures, fractals, art



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Faking out modality with validateMenuItem:
      • From: Jeffrey Johnson <email@hidden>
References: 
 >Faking out modality with validateMenuItem: (From: Jeffrey Johnson <email@hidden>)

  • Prev by Date: Re: Sub classing.
  • Next by Date: Re: Sub classing.
  • Previous by thread: Faking out modality with validateMenuItem:
  • Next by thread: Re: Faking out modality with validateMenuItem:
  • Index(es):
    • Date
    • Thread