• 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: if ([[NSUserDefaults preferences] check box]==true) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: if ([[NSUserDefaults preferences] check box]==true) ?


  • Subject: Re: if ([[NSUserDefaults preferences] check box]==true) ?
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 9 Nov 2003 17:51:31 -0800

On Nov 9, 2003, at 5:33 PM, Scott Anguish wrote:

true.. however,if you want your defaults even more readable, you should also support getting a string back, either Yes, YES, yeS, YeS, etc... :-)

This is one of the attractions of using boolForKey:

- (BOOL)boolForKey:(NSString *)defaultName
Invokes stringForKey: with key defaultName. Returns YES if the value associated with defaultName is an NSString containing the word yes in uppercase or lowercase or responds to the intValue message by returning a nonzero value. Otherwise, returns NO.

mmalc
_______________________________________________
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: 
 >Re: if ([[NSUserDefaults preferences] check box]==true) ? (From: Wade Tregaskis <email@hidden>)
 >Re: if ([[NSUserDefaults preferences] check box]==true) ? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: NSKeyedArchiver, XML, and nibs
  • Next by Date: NSView subclass bindings? NSTextView?
  • Previous by thread: Re: if ([[NSUserDefaults preferences] check box]==true) ?
  • Next by thread: disabling drawing api?
  • Index(es):
    • Date
    • Thread