Re: dispatch_sync(dispatch_get_main_queue() UI weirdness
Re: dispatch_sync(dispatch_get_main_queue() UI weirdness
- Subject: Re: dispatch_sync(dispatch_get_main_queue() UI weirdness
- From: Rainer Brockerhoff <email@hidden>
- Date: Sat, 06 Sep 2014 17:17:33 -0300
On 9/6/14, 14:50, Ken Thomases wrote:
> On Sep 6, 2014, at 7:59 AM, Rainer Brockerhoff <email@hidden> wrote:
> ...
> ... But never do modal stuff in that block.
>
> Why not do modal stuff in such a block? I don't think this function
> is subject to the same serializing problem I described in my previous
> email.
>
> How is running a modal file dialog or alert from such a block
> different from running it in code that just uses the main thread
> (like the action method for the File > Open menu item)? That is,
> unless you're advocating against all modal APIs in all circumstances,
> what makes this different?
I meant for the specific problem the OP posted - which, I gathered, was
running an open file dialog at some point without specific action by the
user _and_ while doing app startup.
> -beginWithCompletionHandler: is not a drop-in replacement for
> -runModal. In particular, it runs a non-modal dialog. The user can
> interact with other windows, etc. That may be what you want in some
> cases, but it isn't appropriate in all.
Same meaning as above. I may have been mistaken in assuming that
Jonathan wanted normal app startup to go ahead _while_ the open file
dialog was processing.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
http://brockerhoff.net/blog/
_______________________________________________
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