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: Pax <email@hidden>
- Date: Tue, 17 Sep 2013 21:27:18 +0100
Thanks Jerry, Thanks Steve,
You guys rock! If you're ever in London I definitely owe you beer!
On 17 Sep 2013, at 14: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. What that does is first write the file to a temp file, then if all goes well, moves it to the actual location, replacing the original file if it exists. So you'll want to let that happen. But up in saveToURL you should be able to point it to your new dir at a higher level, before writeSafelyToURL does its thing.
>
> --
> Steve Mills
> office: 952-818-3871
> home: 952-401-6255
> cell: 612-803-6157
_______________________________________________
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