Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another Icon Question.



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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.