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