Re: NSDocument package saving invalidates wrapper? Options?
Re: NSDocument package saving invalidates wrapper? Options?
- Subject: Re: NSDocument package saving invalidates wrapper? Options?
- From: Mike Abdullah <email@hidden>
- Date: Tue, 04 Sep 2012 12:31:10 +0100
On 2 Sep 2012, at 21:29, Markus Spoettl <email@hidden> wrote:
> On 9/2/12 10:12 PM, Mike Abdullah wrote:
>>> OK, thanks a lot for that tip. Even though I overwrote -setFileURL: for
>>> some other task it never occurred to me to look if that's a better place.
>>> Feels very natural actually. I find it extremely odd that the requirement
>>> to update file wrapper isn't documented anywhere.
>>
>> It seems the doc system assumes you generate the file wrapper afresh each
>> save.
>
> Actually the Document Programming guide goes into details about file wrappers and talks about keeping them for faster IO:
>
> http://developer.apple.com/library/mac/documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/AdvancedTopics/AdvancedTopics.html#//apple_ref/doc/uid/TP40011179-CH7-SW10
Oh good point. I've filed a note asking the docs to be updated.
I suspect in their example, you might actually be OK. Provided all file wrappers start out life in-memory (inefficient I know), I don't believe they ever get purged to disk, so can always be written. When writing, hardlinks are used for efficiency, rather than because that's where the data is located.
_______________________________________________
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