• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tidy up before saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Tidy up before saving
      • From: Jim Graham <email@hidden>
References: 
 >Tidy up before saving (From: Jim Graham <email@hidden>)

  • Prev by Date: which button is chosen as 'default'
  • Next by Date: Re: which button is chosen as 'default'
  • Previous by thread: Tidy up before saving
  • Next by thread: Re: Tidy up before saving
  • Index(es):
    • Date
    • Thread