Boolean Values in a plist
Boolean Values in a plist
- Subject: Boolean Values in a plist
- From: Dale Miller <email@hidden>
- Date: Sun, 23 May 2010 20:23:44 -0700
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. I
can use the objCType method of
NSNumber to distinguish between integers and floats, but a BOOL is an
integer, which is IMHO a bad design decision. In some cases I can use
a priori knowledge to ask for
the boolValue, but in a generalized case I'm forced to use (the name
of) an undocumented class (which was discovered by experimentation).
I'd rather not have to go through a big learning curve to parse the
raw XML, and this to me is a big hole in the design.
Of course, I've likely missed something. I'd rather get flamed for
that than for using an undocumented class. If so, please enlighten me.
Regards,
Dale Miller
email@hidden
_______________________________________________
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