Core Data: How do you properly set a boolean value?
Core Data: How do you properly set a boolean value?
- Subject: Core Data: How do you properly set a boolean value?
- From: "Frederick C. Lee" <email@hidden>
- Date: Thu, 15 Dec 2005 09:03:03 -0800
I believe I found the answer. I need to pass a NSNumber object
holding the BOOL value:
NSNumber *yes = [NSNumber numberWithBool:YES];
[layer setValue:yes forKey:@"active"]; // BOOL flag.
Ric.
Greetings:
I'm trying to programmatically load default values into a
NSManagedObject. But I can't set a required field which is BOOLean:
[layer setValue:YES forKey:@"active"]; // BOOL flag.
warning: passing argument 1 of 'setValue:forKey:' makes pointer
from integer without a cast
What is the proper way to set a boolean value?
Regards,
Ric.
_______________________________________________
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