• 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: Changing filetype/extension of saved document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing filetype/extension of saved document?


  • Subject: Re: Changing filetype/extension of saved document?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Mon, 16 Jun 2003 23:57:01 +0200

At 18:12 Uhr +0100 16.06.2003, Matt Gemmell wrote:
If there's a "better" way to have different icons based on the content of a file, I'd really love to hear more about it.

You could save a custom icon into each file's resource fork. I'm not sure whether you can do that with straight Cocoa, but it's been done in Carbon:

IIRC, you use IconServices to create an IconSuite, convert that to an IconRef, flatten that, and save it to an "icns" resource with ID -16455 in your file's resource fork. Then you set the file's hasCustomIcon flag, and that's it.

The advantage is that the file suffix and everything stay the same.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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: Changing filetype/extension of saved document?
      • From: Matt Gemmell <email@hidden>
References: 
 >Changing filetype/extension of saved document? (From: Matt Gemmell <email@hidden>)

  • Prev by Date: Re: Alternative to Interface Builder?
  • Next by Date: Re: Alternative to Interface Builder?
  • Previous by thread: Changing filetype/extension of saved document?
  • Next by thread: Re: Changing filetype/extension of saved document?
  • Index(es):
    • Date
    • Thread