Re: Modifying the save path in an NSDocument based application
Re: Modifying the save path in an NSDocument based application
- Subject: Re: Modifying the save path in an NSDocument based application
- From: Jerry Krinock <email@hidden>
- Date: Tue, 17 Sep 2013 07:20:32 -0700
On Sep 17, 2013, at 07:49:56, Pax <email@hidden>
wrote:
> I thought that this would be nice and simple
No. Overriding anything in the AppKit document architecture is playing with fireworks, especially since Auto Save and Versions. To be safe, when you're "done", retest all of the functions: Duplicate, Rename, Move To, Browse All Versions, etc., in all OS X versions you're deploying to.
On 2013 Sep 17, at 06:41, Steve Mills <email@hidden> wrote:
> You might try overriding saveToURL:ofType:forSaveOperation:completionHandler: instead. writeToURL is at a very low level in the save operation, and if you look at the stack, I bet writeSafelyToURL:ofType:forSaveOperation:error: is one of the callers of writeToURL.
Steve's advice looks good to me. For a picture of the Save operation, in Xcode's Documentation browser, check out
Document-Based app Programming Guide for Mac > Alternative Design Considerations > Message Flow in the Document Architecture > Saving A Document > Figure 6-6 at the bottom of the page
Supposedly this document has recently been updated to reflect Auto Save and Versions, but I haven't verified that.
_______________________________________________
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