• 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: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized' (with clue)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized' (with clue)


  • Subject: Re: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized' (with clue)
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 5 Apr 2006 14:39:45 -0700

On Apr 5, 2006, at 1:34 PM, Frederick C. Lee wrote:

Question: What is Core Data doing?
          Why does it have a problem with encodeWithCoder?

Core Data should not be doing anything with -encodeWithCoder:. I suspect some of your code is trying to encode or otherwise archive an object that you don't expect.


One strategy for debugging this would be to create a temporary implementation of -encodeWithCoder: in your MapManagedObject class that just NSLogs, and then set a breakpoint on that statement in the debugger. That way you'll be able to look at a stack trace and see exactly how -encodeWithCoder: is being invoked on the object in question.

Note that I'm not suggesting that you make your managed object implement the NSCoding protocol. I'm just suggesting adding a temporary method so you can get to the bottom of the bogus invocation.

  -- Chris

PS - This is a general comment on some discussions I've seen lately on the Cocoa-Dev list, and I don't mean to single you out specifically: If you start a thread of discussion on a topic, and have new information to add to that discussion, it's generally a good idea to reply to one of the previous posts on the topic with the new information rather than to start a new thread. That way the entire thread of discussion will be kept together for people using threaded mail readers such as Mail.app. This can be really helpful, for example, in examining things that have already been tried to resolve an issue.
_______________________________________________
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
  • Follow-Ups:
    • Re: Core Data: 'encodeWithCoder:]: Selector Not Recognized' (Bingo!)
      • From: "Frederick C. Lee" <email@hidden>
    • Re: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized'
      • From: "Frederick C. Lee" <email@hidden>
References: 
 >Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized' (with clue) (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: NSEqualRects returns wrong answer
  • Next by Date: Re: How to tell linker to bind init at runtime
  • Previous by thread: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized' (with clue)
  • Next by thread: Re: Core Data: adding a child data element, saving... 'encodeWithCoder:]: Selector Not Recognized'
  • Index(es):
    • Date
    • Thread