> > Don't know if this helps you but you can look into dispatch_sync > and dispatch_async. >
Thanks a lot! That made things very easy. I am opening the panel now with this piece of code: __block NSURL * user_permitted_url; __block long int result; // UI stuff must be executed in the main thread dispatch_sync( dispatch_get_main_queue(), ^(void) { result = [self askUserToOpenDirectory: resolvedurl newURL: & user_permitted_url]; } ); (where my method askUserToOpenDirectory opens the NSOpenPanel and gets the URL.) BTW: just in case others stumble over this: in my case, I am opening the NSOpenPanel with the directory set to resolvedurl, for which I am asking permission. So the user is just supposed to click "OK". So, I thought, I don't need to do anything else; but it turns out I get permission from the OS really only if I actually get the URL using oPanel.URL , even if it is the same as resolvedurl! Best regards, Gabriel _______________________________________________ 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