Another Icon Question.
Another Icon Question.
- Subject: Another Icon Question.
- From: Diggory Laycock <email@hidden>
- Date: Sun, 30 Dec 2001 16:46:15 +0000
Apologies in advance if this Q is too simple to clog-up the list.
I am looking for a way to get an Icon given a creator and filetype.
I have sucessfully used:
[[NSWorkspace sharedWorkspace] iconForFileType:theExtension]
to get an icon given an extension, and have tried:
theFileTypeString =NSFileTypeForHFSTypeCode(theFileType);
theNSImage=[[NSWorkspace sharedWorkspace] iconForFileType: theFileTypeString
];
but always get the "white/blank document" icon. Which actually makes sense,
since an icon for filetype doesn't make much sense without a creator code.
is this a carbon thing? I can't find anything better than NSWorkspace in
Cocoa, and it doesn't seem to quite do the job.
Thanks.
Diggory Laycock - MonkeyFood.com