Re: Core Data: Save As workflow
Re: Core Data: Save As workflow
- Subject: Re: Core Data: Save As workflow
- From: Ondra Cada <email@hidden>
- Date: Wed, 26 Apr 2006 13:46:03 +0200
Greg,
On 26.4.2006, at 6:40, Greg Herlihy wrote:
Saving a file to the old location creates a new file as well - it just
overwrites the old one
I actually do not know what exactly Core Data (or, in this case,
rather NSPersistentDocument) does, but I *think* it is considerably
more complex than that. The basic save pattern always was not to
overwrite old data, but to
(a) write to new
(b) delete old
(c) rename new to old
so as no data are lost in case of a crash during save. I also believe
the actual saving behaviour of all Document subclasses is *even more*
complex, so as to (a) support aliases (b) support autosaving, but
here I regret to say I do not know the actual details.
So the same store is used for the newly-saved file
in either case
This, of course, would apply regardless.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden