• 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: Plists and booleans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Plists and booleans (From: Thomas Harrington <email@hidden>)
 >Re: Plists and booleans (From: Philippe Martin <email@hidden>)

  • Prev by Date: Re: Plists and booleans
  • Next by Date: Re: Linking Mach-O and AIX binaries
  • Previous by thread: Re: Plists and booleans
  • Next by thread: How to launch a cocoa/java app at system startup prior to login
  • Index(es):
    • Date
    • Thread