Re: Boolean Values in a plist
Re: Boolean Values in a plist
- Subject: Re: Boolean Values in a plist
- From: Ken Thomases <email@hidden>
- Date: Sun, 23 May 2010 22:51:53 -0500
On May 23, 2010, at 10:23 PM, Dale Miller wrote:
> I need to use the parameters obtained from a plist (via NSPropertyListSerialization). I can get the process to work quite well, except that I have to use in my code an undocumented class: NSCFBoolean.
> Determining that the returned object is of class NSCFBoolean is the only way I've been able to determine that I have a Boolean value.
Are you sure you need to distinguish booleans from other numbers? There's a reason that all of them end up represented as NSNumber objects.
In any case, you can drop down to Core Foundation to make the distinction, if necessary.
CFGetTypeID(someObject) == CFBooleanGetTypeID()
Regards,
Ken
_______________________________________________
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