Re: Problem with using NSSavePanel's beginSheetForDirectory
Re: Problem with using NSSavePanel's beginSheetForDirectory
- Subject: Re: Problem with using NSSavePanel's beginSheetForDirectory
- From: Scott Anguish <email@hidden>
- Date: Tue, 11 Mar 2003 22:51:33 -0500
On Tuesday, March 11, 2003, at 06:08 PM, Xiaotao Guo wrote:
The save panel can pop up, and then disappear quickly with myWindow
before I
can do anything on it.
Right. Believe it or not, this is probably correct. You're being
notified that the window is going to close, and because the sheet only
is presented and doesn't run modal, window then closes as is requested.
You want to use a delegate method that will allow you to stop the
closing if the document needs to be saved, then present your sheet, and
when the sheet is dismissed, then cause the window to close
programatically.
Honestly.. this is much easier if you use the Document architecture..
even if you want to only allow a single document window to be open at a
time.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.