On Dec 23, 2009, at 03:28, Rob Keniger wrote:

> On 23/12/2009, at 9:18 PM, Quincey Morris wrote:
> 
>> What's a doc? Seriously, are you talking about a file, or a 
>> NSPersistentDocument subclass instance, or what?
>> 
>> If you're asking "Is it possible to archive arbitrary values as raw binary 
>> data or perhaps using the NSKeyedArchiver mechanism in a persistent store 
>> alongside but not within the Core Data database?" then the answer is no. You 
>> have to implement persistent storage for a value kept in a regular ivar as a 
>> property of some Core Data entity using the techniques described in the Core 
>> Data documentation.
> 
> 
> That's not 100% true, you can store an NSFileWrapper that contains a Core 
> Data store as well as other files, so you can store whatever data you like. 
> See this sample code for an example:
> 
> http://developer.apple.com/mac/library/samplecode/PersistentDocumentFileWrappers/
> 
> It's not perfect but it certainly works.

Well, FWIW it was 100% true because I deliberately specified "in a persistent 
store". :)

A file wrapper (or, *shudder*, a resource fork) might be a solution for a 
determined person, but it would be far easier to embed the data in a Core Data 
property.

Assuming that this is what the OP is asking about to begin with.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to