Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:
Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:
- Subject: Displaying multiple errors in NSOpenPanel beginSheetModalForWindow:completionHandler:
- From: Steve Mills <email@hidden>
- Date: Tue, 24 Feb 2015 03:09:17 -0600
I've been trying tons of different things, but can't make this work. I'm running an NSOpenPanel with beginSheetModalForWindow:completionHandler: to choose a destination folder. In the completionHandler I'm processing 1 or more files by copying them to the chosen folder. When an error appears for a file copy, I want to put up an NSAlert to warn the user with beginSheetModalForWindow:completionHandler:, and use showsSuppressionButton to allow them to skip subsequent errors, and I need the loop to wait until the user has dismissed the alert.
Just doing it that way puts up lots of overlapping alert sheets without waiting for the user to respond. While that certainly would keep the user on their toes, it's not at all right. I've tried using a semaphore to wait for the alert (couldn't process user input), running the alert in a dispatch_sync block (that just blocked), and a bunch of other stuff.
Ideas?
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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