• 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: Validating in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Validating in Core Data (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: Validating in Core Data
  • Next by Date: Re: Validating in Core Data
  • Previous by thread: Validating in Core Data
  • Next by thread: Re: Validating in Core Data
  • Index(es):
    • Date
    • Thread