Re: Faking out modality with validateMenuItem:
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