• 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
Boolean Values in a plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Boolean Values in a plist


  • Subject: Boolean Values in a plist
  • From: Dale Miller <email@hidden>
  • Date: Sun, 23 May 2010 20:23:44 -0700

I need to use the parameters obtained from a plist (via NSPropertyListSerialization). I can get the process to work quite well, except that I have to use in my code an undocumented class: NSCFBoolean.
Determining that the returned object is of class NSCFBoolean is the only way I've been able to determine that I have a Boolean value. I can use the objCType method of
NSNumber to distinguish between integers and floats, but a BOOL is an integer, which is IMHO a bad design decision. In some cases I can use a priori knowledge to ask for
the boolValue, but in a generalized case I'm forced to use (the name of) an undocumented class (which was discovered by experimentation).
I'd rather not have to go through a big learning curve to parse the raw XML, and this to me is a big hole in the design.


Of course, I've likely missed something. I'd rather get flamed for that than for using an undocumented class. If so, please enlighten me.

Regards,
Dale Miller
email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Boolean Values in a plist
      • From: Quincey Morris <email@hidden>
    • Re: Boolean Values in a plist
      • From: Ken Thomases <email@hidden>
    • Re: Boolean Values in a plist
      • From: "James W. Walker" <email@hidden>
  • Prev by Date: Re: NSDoc's Magic File Watcher Ruins Core Data Migration
  • Next by Date: Re: Boolean Values in a plist
  • Previous by thread: Re: NSDoc's Magic File Watcher Ruins Core Data Migration [SOLVED]
  • Next by thread: Re: Boolean Values in a plist
  • Index(es):
    • Date
    • Thread