• 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
Tidy up before saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tidy up before saving


  • Subject: Tidy up before saving
  • From: Jim Graham <email@hidden>
  • Date: Mon, 13 Aug 2007 12:06:42 +0100

A newbie question. I have a document based app where I would like to give the user the choice to "tidy up" a few things before saving. I have put a call to a method,"tidyUpWanted" in "saveDocument" and "saveDocumentAs". This method displays an alert and depending on the answer either returns YES or NO and the appropriate action carried out. The save sheet is then displayed and the document saved.


-(IBAction)saveDocument:(id)sender { if ([self tidyUpWanted]) { [self doTidyUp]; } [super saveDocument:sender]; }


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.

Cheers
Jim Graham
_______________________________________________

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: PGM <email@hidden>
  • Prev by Date: Drag with NSTableView
  • Next by Date: Re: Drag with NSTableView
  • Previous by thread: Re: Which profile is applied in converting PDF/EPS images from CMYK to RGB?
  • Next by thread: Re: Tidy up before saving
  • Index(es):
    • Date
    • Thread