• 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: Write a prefs file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write a prefs file


  • Subject: Re: Write a prefs file
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 30 May 2002 11:46:19 -0700

On Wednesday, May 29, 2002, at 08:57 PM, JollyRoger wrote:

Come on. Don't follow blindly - learn about the subject!

The fact is many current Mac OS X apps (even system apps that come with Mac
OS X) contain resources in the resource fork of a resource file within the
bundle.

Don't believe me? Take a look at iTunes, IE, QuickTime Player, Sherlock,
Terminal, the list goes on. Each of these apps contain resource files with
entire collections of resources in them.

True, but none of those applications contain any resource forks. The distinction here, which a lot of people miss, is between a resource *fork* and a resource *file*. Apple tends to not use resource forks for anything. There are currently a few exceptions, like AppleScript applets, but that was a deliberate choice made for backward compatibility.

Resource Manager resources, on the other hand, are just fine [1]. The trick is that they're now typically stored in the data fork. If you look inside, say, Terminal, you'll see a file Terminal.rsrc. If you inspect it, you'll discover that it has no resource fork, and the data fork contains all the bits that would historically have been in the resource fork. You can see the resources themselves using DeRez -useDF.


--Chris Nebel
AppleScript Engineering

[1] There are improved replacements for several common types of resource (e.g., .strings files instead of STR# resources, nibs vs. DLOG/DITL/etc.) Developers not obliged to use them, but they have their advantages.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Write a prefs file
      • From: JollyRoger <email@hidden>
    • Re: Write a prefs file
      • From: Philip Aker <email@hidden>
References: 
 >Re: Write a prefs file (From: JollyRoger <email@hidden>)

  • Prev by Date: RE: Need help creating this script
  • Next by Date: Why is the iTunes script flakey?
  • Previous by thread: Re: Write a prefs file
  • Next by thread: Re: Write a prefs file
  • Index(es):
    • Date
    • Thread