Re: Validating in Core Data
Re: Validating in Core Data
- Subject: Re: Validating in Core Data
- From: Jim Correia <email@hidden>
- Date: Tue, 9 Aug 2005 16:20:00 -0400
On Aug 9, 2005, at 4:14 PM, Jeff LaMarche wrote:
I've written a subclass of NSManagedObject, and have implemented a
custom validation method for on attribute. I'm getting a
EXC_BAD_ACCESS (SIGSEGV) when I try and save this field:
-(BOOL)validateUrl:(NSString *)urlString error:(NSError **)error
Your method declaration is wrong.
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html#//apple_ref/doc/uid/
20002173-168285
urlString is passed by reference (so that you can return a substitute
value if necessary), so it should be
-(BOOL)validateUrl:(NSString **)urlString error:(NSError **)error
with the appropriate related changes in the method body.
Jim
_______________________________________________
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