• 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: Wade Tregaskis <email@hidden>
  • Date: Sun, 9 Nov 2003 22:18:40 +1100

Also, if you are testing against true, *don't* use == to do it. C and
most of the code written in it assumes that any non-zero value is true,
so you can trip yourself up and end-up in a situation where something
appears (to your code) to be neither true or false.

Perhaps we should apply some fuzzy logic to this, and just see if things are > false. ;)

Are you basing this on experience, or just the hypothetical problem? I'm aware of this problem, but have never in my life run into it, not even once.

Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Running an App as Root
  • Next by Date: Re: if ([[NSUserDefaults preferences] check box]==true) ?
  • Previous by thread: Re: if ([[NSUserDefaults preferences] check box]==true) ?
  • Next by thread: Re: if ([[NSUserDefaults preferences] check box]==true) ?
  • Index(es):
    • Date
    • Thread