Re: Problem with stopModalWithCode on a different thread
Re: Problem with stopModalWithCode on a different thread
- Subject: Re: Problem with stopModalWithCode on a different thread
- From: Jens Alfke <email@hidden>
- Date: Mon, 21 Jun 2010 17:33:35 -0700
On Jun 21, 2010, at 11:09 AM, Bill Appleton wrote:
> In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for
> opening files, printing, etc.
>
> These system dialogs call stopModalWithCode to deliver the result of the
> dialog interaction back to the runModalForWindow function
>
> But the stopModalWithCode function does not work on another thread
Wait, why is stopModalWithCode being called from a background thread? If the system dialogs are calling it, they would only call it on the main (UI) thread.
In general, if you have some kind of background activity that needs to call some AppKit method like this, use -performSelectorOnMainThread:.
—Jens_______________________________________________
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