Re: NSManagedObject and NSCoding
Re: NSManagedObject and NSCoding
- Subject: Re: NSManagedObject and NSCoding
- From: Miguel Sanchez <email@hidden>
- Date: Fri, 11 Nov 2005 15:38:48 -0800
managed objects are not mean to be encoded/decoded since they rely on
being part of a bigger graph. Are you trying to implement copy/paste?
if so, then I'd suggest looking this for starters
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803-213600
- Miguel
On Nov 11, 2005, at 3:05 PM, email@hidden wrote:
I have an NSManagedObject that I have encoded according to NSCoding
properly. Works fine, that. Now I need to use initWithCoder: to
recreate it and I'm getting the error:
[<Foo 0x6e638b0> setValue:forUndefinedKey:]: this class is not key
value coding-compliant for the key name.
As I have a method setName: that works in all other cases, I'm
guessing that the [super init] I call isn't really doing everything
that is needed, like putting it into a context and so on (this is
out of my control; copy and paste in an NSTokenField) and just
calling alloc/init on it.
So, what can I do inside initWithCoder:, if anything, to make this
work? Or do I have to subclass the NSTokenField and try and work
some magic there?
Adam Knight
I ♥ my
If you’re not going to stop and appreciate the scenery, you’re
not going to enjoy Myst.
The same thing applies on the Mac as well. -- Rand Miller
_______________________________________________
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
_______________________________________________
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