Re: Type of Boolean attributes
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.