• 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: Ending Editing when Doc Saves?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ending Editing when Doc Saves?


  • Subject: Re: Ending Editing when Doc Saves?
  • From: David Carlisle <email@hidden>
  • Date: Fri, 30 May 2008 18:03:46 -0600

After your suggestion, I recalled and reviewed figure 6 about "Saving a Document" in the Document Based Applications Overview. That made it clear to me that saveDocument does call the saveDocumentWithDelegate method.

Then I tried your scenario of closing an unsaved doc. Under the old implementation it failed as you expected. When I transferred my modifications to the saveDocumentWithDelegate method, it worked.

Thanks,
DC

On May 30, 2008, at 5:33 PM, Mike Abdullah wrote:


I couldn't find a more general save operation to modify in MyDocument, so I modified both saveDocument, and saveDocumentAs. I can modify others later if needed. I was thinking there might be something like (BOOL) shouldSaveDocument, but I didn't see it.

Well I would suggest either

- saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo :

or

-saveDocumentWithDelegate:didSaveSelector:contextInfo:


In particular, consider the scenario of the user closing an unsaved doc. If they choose "Save" from the prompt, I'm pretty certain that the actual document saving does not go through either of the IBAction methods.

_______________________________________________

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


References: 
 >Ending Editing when Doc Saves? (From: David Carlisle <email@hidden>)
 >Re: Ending Editing when Doc Saves? (From: Dave Fernandes <email@hidden>)
 >Re: Ending Editing when Doc Saves? (From: David Carlisle <email@hidden>)
 >Re: Ending Editing when Doc Saves? (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Ending Editing when Doc Saves?
  • Next by Date: Re: CGContextSetRGBFillColor() off by one?
  • Previous by thread: Re: Ending Editing when Doc Saves?
  • Next by thread: Re: Ending Editing when Doc Saves?
  • Index(es):
    • Date
    • Thread