Re: Plists and booleans
Re: Plists and booleans
- Subject: Re: Plists and booleans
- From: Matt Judy <email@hidden>
- Date: Wed, 10 Jul 2002 14:49:48 -0700
That is, of course, if you're writing to prefs. Otherwise, you'll want
to use NSNumber's +numberWithBool: , which will be let you stor your
BOOL as a Boolean in the plist.
--Matt
Philippe Martin wrote:
At 11:27 -0600 10/07/02, Thomas Harrington wrote:
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.
Use NSUserDefaults' setBool:forKey: method to write booleans, and its boolForKey: method to read them.
HTH
Philippe
_______________________________________________
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.