Re: Ending Editing when Doc Saves?
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