On May 22, 2014, at 11:41 AM, Jens Alfke <j...@mooseyard.com> wrote:

> 
> On May 22, 2014, at 8:29 AM, edward taffel <etaf...@me.com> wrote:
> 
>> this i have remedied. however, given the scenario where a url has vanished, 
>> i first show an NSAlert & then an NSOpenPanel to offer relink. NSOpenPanel 
>> causes no such background thread issue: do the two have variant thread 
>> safety? or is this likely to change in the future for NSOpenPanel, as well?
> 
> I suspect NSOpenPanel just doesn’t have special code to detect misuse. It 
> probably happens so often with NSAlert that they added a warning for it. 
> 
> In general, you shouldn’t call _any_ AppKit code from a background thread. 
> Ditto for any other UI-level framework that uses AppKit. (There are some 
> exceptions, like working with offscreen NSImages, but in general the Apple 
> API docs will tell you when an API is thread-safe.)

i find no mention of thread safety in the NSOpenPanel doc, but the doc mentions 
‘Open panels are drawn in a separate process by the powerbox’: perhaps this is 
the reason.

> 
> —Jens

thanks for your advice, jens.

_______________________________________________

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