Blocking while a save panel sheet is showing
Blocking while a save panel sheet is showing
- Subject: Blocking while a save panel sheet is showing
- From: Kenneth Baxter <email@hidden>
- Date: Mon, 14 Feb 2011 12:01:46 +0000 (GMT)
Hi everyone, I am using a framework where I register as a delegate and when my delegate method is called, I should be able to save my data, and then the framework does different things based on whether the data has been saved or not.
I need to ask the user for the file name to save as, and then save the file. I have tried both the beginSheetModalForWindow:completionHandler: method and the old 10.5 beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo: method, but both of them return immediately, and the framework thinks I haven't saved the file.
Is there some way that I can display the save panel in such a way that it actually blocks until the user has chosen the save or cancel button on the save panel, like what NSRunAlertPanel does? That way, I would be able to get the file name and save the file before the method returned to the framework.
Thanks
Ken
_______________________________________________
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