Re: storing ivars in core data docs
Re: storing ivars in core data docs
- Subject: Re: storing ivars in core data docs
- From: Rob Keniger <email@hidden>
- Date: Wed, 23 Dec 2009 21:28:20 +1000
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.
For the OP, as Quincey pointed out, your question is not clear. What are you trying to do?
--
Rob Keniger
_______________________________________________
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