• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSManagedObject and NSCoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSManagedObject and NSCoding (From: email@hidden)

  • Prev by Date: Setting double action from NSCell
  • Next by Date: Re: Using Objective-C From JavaScript
  • Previous by thread: NSManagedObject and NSCoding
  • Next by thread: Setting double action from NSCell
  • Index(es):
    • Date
    • Thread