• 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: Accessing Classic Mac Resources from Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing Classic Mac Resources from Cocoa


  • Subject: Re: Accessing Classic Mac Resources from Cocoa
  • From: Dietmar Planitzer <email@hidden>
  • Date: Sat, 23 Feb 2002 15:46:21 +0100

> From: Finlay Dobbie <email@hidden>
> Date: Sat, 23 Feb 2002 11:41:53 +0000
> To: Charles Srstka <email@hidden>
> Cc: John Pattenden <email@hidden>, email@hidden
> Subject: Re: Accessing Classic Mac Resources from Cocoa
>
> On Saturday, February 23, 2002, at 01:58 AM, Charles Srstka wrote:
>
>> There's a function somewhere called FSPathMakeRef that will get you an
>> FSRef from a path. From there, you can get an FSSpec from the FSRef
>> somehow, I think.
>
> There's a function in CFURL.h called CFURLCopyRef() or something that
> returns the FSRef of a CFURL. Then you can create an FSSpec from the
> FSRef quite easily, I forget the exact call. Then you can write a nice
> obj-c wrapper around the resource manager and open source it! :-)


Another option would be to open the resource file via the FSOpenResFile()
function which takes a FSRef directly. This way its not necessary to
translate the FSRef into an FSSpec.

I would strongly recommend that one always uses the FSRef version of a given
Carbon API rather than the FSSpec version, because the former has no problem
supporting long filenames.


Regards,

Dietmar Planitzer
_______________________________________________
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.

  • Follow-Ups:
    • Re: Accessing Classic Mac Resources from Cocoa
      • From: Nicholas Shanks <email@hidden>
References: 
 >Re: Accessing Classic Mac Resources from Cocoa (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: Dealing with NSPopupButton
  • Next by Date: Cocoa database info
  • Previous by thread: Re: Accessing Classic Mac Resources from Cocoa
  • Next by thread: Re: Accessing Classic Mac Resources from Cocoa
  • Index(es):
    • Date
    • Thread