• 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: Validation error in a relationship? (in coredata)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validation error in a relationship? (in coredata)


  • Subject: Re: Validation error in a relationship? (in coredata)
  • From: Jim Correia <email@hidden>
  • Date: Wed, 17 Oct 2007 00:07:44 -0400

On Oct 16, 2007, at 7:58 PM, Chris Hanson wrote:

Your code is still incorrect. Just looking at <http://pastebin.com/ m38aa3280>...

(1) Your -setMessageBody: method is not using the *change* notification methods, it is using the *access* notification methods. This is incorrect.

(2) Your -messageBody: method is not using the access notification methods, it is just returning the result of - primitiveValueForKey:. This is incorrect.

You have similar errors in the rest of your code, at least from looking at <http://pastebin.com/m65f42c4b>. I strongly recommend reading up a bit more on how to write Core Data accessors and ensuring the correctness of your code with respect to the Core Data documentation. I suspect that will help resolve the problem in your code a lot more quickly, and help prevent more problems of this kind from cropping up.

After reading and understanding the docs, it may also be a good idea to just use


	Copy Method Declarations to Clipboard
	Copy Method Implementations to Clipboard

from the data modeler and use the generated methods/delcarations as a starting point to which you can add any necessary customizations. That will prevent inadvertent use of will/didAccessValueForKey when you should have been using will/didChangeValueForKey.

Jim
_______________________________________________

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


References: 
 >Re: Validation error in a relationship? (in coredata) (From: Ron Lue-Sang <email@hidden>)
 >Re: Validation error in a relationship? (in coredata) (From: "dexter.cocoa dexter" <email@hidden>)
 >Re: Validation error in a relationship? (in coredata) (From: Chris Hanson <email@hidden>)
 >Re: Validation error in a relationship? (in coredata) (From: malcom <email@hidden>)
 >Re: Validation error in a relationship? (in coredata) (From: malcom <email@hidden>)
 >Re: Validation error in a relationship? (in coredata) (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: TableView not loading completely
  • Next by Date: Re: Advise for new video analysis program
  • Previous by thread: Re: Validation error in a relationship? (in coredata)
  • Next by thread: Re: Validation error in a relationship? (in coredata)
  • Index(es):
    • Date
    • Thread