setting a BOOL var in a NSManagedObject
setting a BOOL var in a NSManagedObject
- Subject: setting a BOOL var in a NSManagedObject
- From: Steven Crosley <email@hidden>
- Date: Wed, 2 Jan 2008 10:05:03 -0600
I have a subclass of a NSManagedObject where one of the attributes is
a Boolean type. My method to set the value of this attribute looks
like this:
- (void)setActive:(BOOL)flag
{
[self willChangeValueForKey:@"active"];
[self setPrimitiveValue:flag forKey:@"active"];
[self didChangeValueForKey:@"active"];
}
However, I'm getting the warning message below:
warning: passing argument 1 of 'setPrimitiveValue:forKey:' makes
pointer from integer without a cast
It doesn't appear to set it when I run the app and I get the following
error message in the logs:
setNilValueForKey]: instance of entity Test could not set nil as the
value for the key active.
Any Help would be appreciated.
Thanks!
Steven
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden