Re: CFBoolean
Re: CFBoolean
- Subject: Re: CFBoolean
- From: Jason Coco <email@hidden>
- Date: Sun, 24 Aug 2008 21:41:52 -0400
On Aug 24, 2008, at 21:33 , Chris Idou wrote:
How do I create a property in the user defaults of type boolean?
Internally it seems to use a NSCFBoolean which is an undocumented
type. If I make the assumption it is the same as a CFBoolean, and
overlooking the oddness of having to fall back to Carbon for such a
fundamental thing, the documentation of CFBoolean doesn't seem to
provide a documented method for creating one.
You don't... there is only kCFBooleanTrue and kCFBooleanFalse. To
assign a value to a boolean, do:
CFBooleanRef thisOneIsTrue = kCFBooleanTrue;
CFBooleanRef thisOneIsFalse = kCFBooleanFalse;
To test for true or false, you can use:
CFBooleanGetValue(theBooleanValue) which returns a Boolean type...
HTH, Jason
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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
References: | |
| >CFBoolean (From: Chris Idou <email@hidden>) |