• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: nsuserdefaults and bools.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nsuserdefaults and bools.


  • Subject: Re: nsuserdefaults and bools.
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 18 Apr 2003 23:04:43 -0400

On Friday, April 18, 2003, at 10: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

Store it as a string - the docs for the boolForKey: method state that if the value is upper- or lower-case YES, or if it responds to the intValue message with a non-zero value, it is interpreted as true, and otherwise it is interpreted as false.

sherm--

The highest sounds are hardest to hear.
Going forward is a way to retreat.
Great talent shows itself late in life.
Even a perfect program still has bugs.

-- The Tao of Programming
_______________________________________________
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.

References: 
 >nsuserdefaults and bools. (From: Francisco Tolmasky <email@hidden>)

  • Prev by Date: Re: NSInvocation and ints
  • Next by Date: Re: Make the action of a NSMenuItem, which has a subMenu, to work
  • Previous by thread: nsuserdefaults and bools.
  • Next by thread: Re: nsuserdefaults and bools.
  • Index(es):
    • Date
    • Thread