• 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
incompatible Pointer...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incompatible Pointer...


  • Subject: incompatible Pointer...
  • From: Mark Butler <email@hidden>
  • Date: Sat, 3 Jun 2006 12:39:52 -0700

Documentation on CFString says:

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 also applies to concrete subclasses of NSString. See Interchangeable Data Types for more information on toll-free bridging.

I am getting an incompatible pointer type warning in xcode when using the following code:

	NSString *path = [filePath stringValue];

    	MDItemRef item = MDItemCreate(kCFAllocatorDefault, path);

filePath is an NSTextField.


I am still struggling to get this stuff... Reading the documentation seems to say that these types can be used interchangeably "toll-free"


The program runs fine... So it seems to work but I would like to get rid of the warning. Is this just an xCode bug?

Mark _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: incompatible Pointer...
      • From: mmalcolm crawford <email@hidden>
References: 
 >Problem with validation (reproducible with EventManager example) (From: email@hidden)
 >Re: Problem with validation (reproducible with EventManager example) (From: mmalcolm crawford <email@hidden>)
 >Re: Problem with validation (reproducible with EventManager example) (From: email@hidden)

  • Prev by Date: Re: Problem with validation (reproducible with EventManager example)
  • Next by Date: Re: incompatible Pointer...
  • Previous by thread: Re: Problem with validation (reproducible with EventManager example)
  • Next by thread: Re: incompatible Pointer...
  • Index(es):
    • Date
    • Thread