> Rarely do I suggest performSelector: but it happens to work here. I’d love to 
> know more about why dispatch doesn’t work so well however. 

It is only a slightly educated guess, but I suspect it is because the UI is 
queuing work as well. Running under Instruments shows a number of activities 
queued and they run only after the panel is closed. I suspect that either the 
modal run loop isn’t prepared to handle these requests itself or that AppKit 
has special considerations when performing runModalForWindow at event handling 
time that it doesn’t handled when performing queued GCD or NSOperation work. 
Apple’s documentation on what can or should be done within work queued to the 
main dispatch queue or NSOperationQueue’s main queue is very limited. However, 
my experience suggests that not all UI tasks can be performed from these points 
in the run loop.
—kevin

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to