Re: CFStringRef == NSString* ?
Re: CFStringRef == NSString* ?
- Subject: Re: CFStringRef == NSString* ?
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 21 Apr 2004 14:00:27 -0700
On Apr 21, 2004, at 1:22 PM, Mark Alldritt wrote:
If this is true, then I can safely cast my CFStringRef to a NSString*
and
pass it along to the Objective-C/Cocoa portions of my application.
"CFString is toll-free bridged with its Cocoa Foundation counterpart,
NSString. This means that the Core Foundation type is interchangeable
in function or method calls with the bridged Foundation object.
Therefore, in a method where you see an NSString * parameter, you can
pass in a CFStringRef, and in a function where you see a CFStringRef
parameter, you can pass in an NSString instance. This fact also applies
to concrete subclasses of NSString. See Integrating Carbon and Cocoa in
Your Application for more information on toll-free bridging."
<
http://developer.apple.com/documentation/CoreFoundation/Reference/
CFStringRef/Reference/Introduction.html>
mmalc
_______________________________________________
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.