Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ending Editing when Doc Saves?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.