Re: Changing filetype/extension of saved document?
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.