• 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: [SOLVED] Do CoreData validation methods get called for transient attributes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] Do CoreData validation methods get called for transient attributes?


  • Subject: Re: [SOLVED] Do CoreData validation methods get called for transient attributes?
  • From: Ben Trumbull <email@hidden>
  • Date: Mon, 12 Nov 2007 19:23:22 -0800

At 7:04 PM -0800 11/12/07, email@hidden wrote:
On Nov 12, 2007, at 3:38 AM, mmalc crawford wrote:

You are strongly discouraged from modifying the value during validation.
<http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html#//apple_ref/doc/uid/
20002173-169942-CJBHDJGC>


 mmalc


I'm a bit confused about this. In the reference above under "Implementing a Validation Method", outcome #2 is "A new object value that is valid is created and returned." Does the strong discouragement of this practice apply only to Core Data? In any case, is there a more appropriate place to coerce a value?

Well, perhaps it's more a vanilla discouragement. It's easy to create infinite loops where your validation logic changes a managed object, we process the changes, the coalesced (and potentially propagated, KVO responded to, etc) changes are re-validated, your validation logic changes a managed object ...



--

-Ben
_______________________________________________

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


  • Prev by Date: Re: Change a NSMenu's shape?
  • Next by Date: Re: Notification when switching Spaces?
  • Previous by thread: Re: group animation fire frame change?
  • Next by thread: CIFilter Problems Under Leopard
  • Index(es):
    • Date
    • Thread