• 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: CFStringRef == NSString* ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >CFStringRef == NSString* ? (From: Mark Alldritt <email@hidden>)

  • Prev by Date: Re: MyODBC w/Cocoa?
  • Next by Date: Re: Screen saver questions
  • Previous by thread: CFStringRef == NSString* ?
  • Next by thread: Re: CFStringRef == NSString* ?
  • Index(es):
    • Date
    • Thread