Re: Tidy up before saving
Re: Tidy up before saving
- Subject: Re: Tidy up before saving
- From: PGM <email@hidden>
- Date: Mon, 13 Aug 2007 10:38:58 -0400
This works fine if I display the Alert using "runModal" but if I
display the alert as a sheet then the save sheet never gets displayed.
Use of NSLog in "saveDocument" shows that this method is not
returned to until the dialog is dismissed when runModal is used but
is returned to immediately the sheet is displayed. So effectively
my app is then trying to display the save sheet at the same time
as my sheet is up.
As it is a document based app I would prefer to have the alert as a
sheet attached to it's document any help would be appreciated.
When you display a sheet, it indeed always returns immediately.
Therefore you have to pass a modalDelegate and a didEndSelector when
displaying the sheet. You can then call [super saveDocument:nil] from
within the didEndSelector. In that way first your own sheet is
displayed and only when it is dismissed, the standard sheet.
Cheers, Patrick
_______________________________________________
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