• 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: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method


  • Subject: Re: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
  • From: Cameron Hayne <email@hidden>
  • Date: Sun, 22 Jan 2006 18:52:46 -0500

On 22-Jan-06, at 5:55 PM, email@hidden wrote:

warning: passing argument 1 of 'validateValue:forKey:error:' from incompatible pointer type

if ([location validateValue:tempCDATA forKey:@"name" error:&error]) { // warning here
[...]
This happens if the tempCDATA is an NSString, NSNumber, or id.

Looking in the NSManagedObject docs, I see that the signature of that method is:
- (BOOL)validateValue:(id *)value forKey:(NSString *)key error: (NSError **)error
which shows that the first argument is supposed to be of type (id *) i.e. a pointer to an object, not an object itself.
So you likely need to put an ampersand (&) in front of the object variables when you invoke this method:
[location validateValue:&tempCDATA forKey:@"name" error:&error]


--
Cameron Hayne
email@hidden


_______________________________________________ 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: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
      • From: Uli Kusterer <email@hidden>
References: 
 >Incompatible pointer type from NSManagedObject's validateValue:forKey:error method (From: email@hidden)

  • Prev by Date: NSTextView - custom pasteboard types and tables
  • Next by Date: NSImageView Subclass Leak?
  • Previous by thread: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
  • Next by thread: Re: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
  • Index(es):
    • Date
    • Thread