Plists and booleans
Plists and booleans
- Subject: Plists and booleans
- From: Thomas Harrington <email@hidden>
- Date: Wed, 10 Jul 2002 11:27:16 -0600
Using Property List Editor I can put any of seven different types into a
plist-- Dictionary, String, etc. All of them have a corresponding Cocoa
class named by prepending "NS" to the type shown in the editor. Except
boolean.
If I create a plist with a boolean (via the editor) and read it into an
NSDictionary, I get what claims to be an NSCFBoolean (according to
results of NSObject's -class method). I'm guessing that this means
"CFBoolean", because so far I can't find any evidence that "NSCFBoolean"
actually exists.
But how do I create a CFBoolean? I can find CFBooleanRef in the
documentation, which would be great if I had a CFBoolean for it to refer
to.
I hope this doesn't seem off-topic; what I really want is to put a
boolean in an NSDictionary in such a way that I can write it to a plist,
and CFBoolean only comes in as the likely-seeming solution. I know I
could wrap a boolean value in an NSNumber, but that seems kind of silly
when a plist can have a plain boolean value.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.