• 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 - Newbie] Custom validation method called twice.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Core Data - Newbie] Custom validation method called twice.


  • Subject: Re: [Core Data - Newbie] Custom validation method called twice.
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 29 Jul 2005 02:07:36 -0700


On Jul 28, 2005, at 9:55 PM, Charles Haron wrote:

I've set up my bindings to validate immediately. After the user enters data, and then attempts to move to the next field, or record, a custom validation method is called. The method then performs a fetch request to see if another record already exists with a value matching the one passed to the custom validation method. If a match is found the validation method returns NO (everything works fine up to this point).
The problem I have is that when the application exits, the validation is done a second time and any new records added during that session fail the custom validation. I only need the validation to occur once (with "validate immediately"). How do I prevent the validation when exiting the application?


(Given that save: is invoked) You can't, and you shouldn't.
If I guess correctly what you're actually trying to do, your validation method should check that any object that matches the fetch is not self.


mmalc


_______________________________________________ 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: 
 >[Core Data - Newbie] Custom validation method called twice. (From: Charles Haron <email@hidden>)

  • Prev by Date: Regex? Need to style portions of text that are not all the same
  • Next by Date: Scrolling of NSTextView messed up
  • Previous by thread: [Core Data - Newbie] Custom validation method called twice.
  • Next by thread: NSTreeController ChildKeyPath
  • Index(es):
    • Date
    • Thread