[Core Data - Newbie] Custom validation method called twice.
[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