• 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: Custom document icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom document icons


  • Subject: Re: Custom document icons
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 18 Apr 2007 01:44:37 +0200

Am 18.04.2007 um 01:44 schrieb Chris McFarling:
I'm not a Mac programmer but have a couple questions that I think requires OS X programming knowledge.

???

When an app creates/saves a document, the document can have a custom icon assigned to it. From what I gather there are a couple ways to associate the custom icon with the document type. One is the old fashioned way that utilizes a resource fork and the other uses newer OS X specific techniques. If a resource fork is not used, do type/creator codes still need to be present for OS X to utilize a custom document icon?

For *custom* icons, type/creator codes were never needed. They were only needed for "regular" icons, i.e. icons defined by an application for its documents. Since OS X, you can also key off the file name suffix ("extension") to decide what icon to show for a particular type.


Photoshop (and maybe other graphics apps) is unique in that it can save a thumbnail representation of the image as the document icon. This means that every document can have a unique icon. Currently, even with the latest versions of Photoshop (haven't tried CS3 yet though) & OS X, a resource fork is still being used to accomplish this type of custom icon. Is there any other way that this can be done without using a resource fork, currently or in the future? Does Adobe plan on using resource forks for the forseeable future? Will OSX support resource forks for the forseeable future?

So far, Apple has made no indication that resource forks are going away. They have simply discouraged their use for essential information, as they might get stripped off e.g. when transferred across the web. So unless thumbnails are essential in some way, I don't see why you shouldn't use them. You can always re-generate them based on the file's contents, after all.


And anyway, they're the only way to get custom icons for files on the Mac, and they get simulated on non-HFS disks, so are available pretty reliably. They're simply your only option, whether Apple or Adobe choose to use them, or not.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Custom document icons (From: "Chris McFarling" <email@hidden>)

  • Prev by Date: Re: safe and efficient way tp duplicate NSMutable array
  • Next by Date: Moderator: EOT [Re: Custom document icons]
  • Previous by thread: Custom document icons
  • Next by thread: Moderator: EOT [Re: Custom document icons]
  • Index(es):
    • Date
    • Thread