Hi,
I'm writing an app that deals with filetypes:
the problem comes when I want to get an icon that represents a filetype and creatorcode couplet.
Cocoa doesn't *seem* to have this ability, the closest I have found is the NSWorkspace Class.
NSWorkspace has a iconForFiletype: method that I have used successfully to get an icon for an extension-type. The same method can take a filetype, but that's not really what I need as I need to specify the creator code as well. (a document with a filetype 'HTML' will have a different icon depending on the creatorcode)
So I assume that I'll have to use carbon to do this. The File Manager seemed to have the answer in the PBDTGetIconSync function, but when I tried to use this I found that you must pass the size of icon you require, by way of a constant. The largest of these is defined as:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>kLarge8BitIconSize
Large <font color = blue>8</font>-bit color icon. Corresponding resource type: 'icl8'.</font>[/code]
That's not really what I want, I would like a mac os X style massive icon.
So obviously this isn't the way to go about it either!
What is the correct way? Does anyone know?
Thanks