Re: nsuserdefaults and bools.
Re: nsuserdefaults and bools.
- Subject: Re: nsuserdefaults and bools.
- From: Nick Zitzmann <email@hidden>
- Date: Sat, 19 Apr 2003 08:28:23 -0700
On Friday, April 18, 2003, at 07:11 PM, Francisco Tolmasky wrote:
I know I can set a bool using setBool:forKey: in NSUserDefaults, but
when I register my defaults, how do I do this within the Dictionary I
pass in. In other words, how do I store the bool in my dictionary, is
it similar to the way you archive bools?
You can use NSNumber as a wrapper to store a BOOL (or any other number)
into a dictionary. Then, when you store the dictionary into the user
defaults, the boolean value will be typedef'd correctly. Check the
NSNumber documentation for more information...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://dreamless.home.attbi.com/
"Building the future and keeping the past alive are one and the same
thing." - Metal Gear Solid 2
_______________________________________________
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.