• 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: CFURLRef -> NSRURL* ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFURLRef -> NSRURL* ???


  • Subject: Re: CFURLRef -> NSRURL* ???
  • From: David Remahl <email@hidden>
  • Date: Tue, 25 Mar 2003 01:04:40 +0100

Yes, it is OK to do that. The types are "toll free bridged" to their Foundation counterparts. Look up toll free bridging in the documentation for more information on how it is used, and what types are bridged.

/ Rgds, David Remahl

on the archive I see this sample of code (<see at the end of the mail>)
where the guy simply cast a CFURLRef to a NSURL* !!!!
is it correct ?
does it work for CFStringRef -> NSString* and
CFNumberRef -> NSNumber* ???


// ---- code sample ----
- (NSString *)findSystemFolderType:(int)folderType forDomain:(int)domain
{
FSRef folder;
OSErr err = noErr;
CFURLRef url;
NSString *result = nil;

err = FSFindFolder(domain, folderType, false, &folder);

if (err == noErr) {
url = CFURLCreateFromFSRef(kCFAllocatorDefault, &folder);
result = [(NSURL *)url path];
}

return result;
}
_______________________________________________
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: 
 >CFURLRef -> NSRURL* ??? (From: Lloyd Dupont <email@hidden>)

  • Prev by Date: CFURLRef -> NSRURL* ???
  • Next by Date: Re: CFURLRef -> NSRURL* ???
  • Previous by thread: CFURLRef -> NSRURL* ???
  • Next by thread: Re: CFURLRef -> NSRURL* ???
  • Index(es):
    • Date
    • Thread