That might work, though I would probably recommend overriding at -saveToURL:ofType:forSaveOperation:completionHandler: instead, and only modify the path if saveOperation == NSAutosaveElsewhereOperation. If you override at that level, setAutosavedContentsFileURL: will be invoked for you when the save is complete.
-KP On Apr 16, 2013, at 12:54 PM, Steve Mills <smi...@makemusic.com> wrote: > Is it possible for the app to set the directory where autosaved documents > will be stored instead of the folder the OS creates deep within > /private/var/folders? Our app has long done its own autosaving and offered a > pref so the user could change the dir if they wanted. I'm now looking into > the possibility of switching to Cocoa's autosave instead, and would like all > our autosave prefs to remain as they are and still be usable. > > Would it be gross to override > writeToURL:ofType:forSaveOperation:originalContentsURL:error: and if it's an > autosave operation, rejigger the url to use own dir, and finally call > setAutosavedContentsFileURL with the url we saved to instead? > > -- > Steve Mills > office: 952-818-3871 > home: 952-401-6255 > cell: 612-803-6157 > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/kperry%40apple.com > > This email sent to kpe...@apple.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com