• 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: Type of Boolean attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type of Boolean attributes


  • Subject: Re: Type of Boolean attributes
  • From: Mike Engber <email@hidden>
  • Date: Tue, 26 Nov 2002 13:59:21 -0800

In the attributes table in the preliminary reference documentation for
assistive apps, several attributes are described as having a value type of
"CFBoolean." Am I right in assuming this should be "CFBooleanRef"?

Yes. File bugs on the docs.

What is the recommended way to convert a CFBooleanRef value to a Cocoa
NSNumber object? This isn't discussed in the preliminary Carbon-Cocoa
Integration document, and I can't find it explained anywhere.

I ended up doing it like this. It works, but it seems awfully convoluted.

[NSNumber numberWithBool:(BOOL)CFBooleanGetValue((CFBooleanRef)value)]

You can just cast a CFBooleanRef to a NSNumber* - they're toll-free bridged.

-ME
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Type of Boolean attributes
      • From: Bill Cheeseman <email@hidden>
References: 
 >Type of Boolean attributes (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Type of Boolean attributes
  • Next by Date: Re: Type of Boolean attributes
  • Previous by thread: Type of Boolean attributes
  • Next by thread: Re: Type of Boolean attributes
  • Index(es):
    • Date
    • Thread