Re: Changing filetype/extension of saved document?
Re: Changing filetype/extension of saved document?
- Subject: Re: Changing filetype/extension of saved document?
- From: Matt Gemmell <email@hidden>
- Date: Tue, 17 Jun 2003 02:34:57 +0100
On Monday, June 16, 2003, at 10:57 pm, M. Uli Kusterer wrote:
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.
The answer is always obvious in retrospect, isn't it? :)
There's a great Cocoa wrapper for IconServices available here:
<
http://homepage.mac.com/troy_stephens/software/objects/IconFamily/>
Cheers,
-Matt
--
Matt Gemmell
Scotland Software
http://www.scotlandsoftware.com/
_______________________________________________
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.