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

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


  • Subject: [Core Data - Newbie] Custom validation method called twice.
  • From: Charles Haron <email@hidden>
  • Date: Thu, 28 Jul 2005 22:55:55 -0600 (GMT-06:00)

Hello All,

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?

I've noticed the my AppDelegate's applicationShouldTerminate: method sends the commitEditing and save: messages the NSManageObjectContext (BTW I can't find a commitEditing for NSManageObjectContext in the documentation).  I assume that one of those messages are causing the custom validation method to be called again.

Thanks,
Charles
 _______________________________________________
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 - Newbie] Custom validation method called twice.
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Crash when calling custom methods in custom subclass.
  • Next by Date: Re: CoreData Tutorial bindings
  • Previous by thread: Re: Crash when calling custom methods in custom subclass.
  • Next by thread: Re: [Core Data - Newbie] Custom validation method called twice.
  • Index(es):
    • Date
    • Thread