Re: How are we supposed to retrieve the generic bundle icon?
Re: How are we supposed to retrieve the generic bundle icon?
- Subject: Re: How are we supposed to retrieve the generic bundle icon?
- From: Gregory Weston <email@hidden>
- Date: Tue, 11 Nov 2008 14:15:53 -0500
Iceberg-Dev wrote:
I need to get a NSImage of the generic bundle icon. (Mac OS X 10.4 or
later)
I'm currently using this:
[[NSImage alloc] initWithContentsOfFile:@"/System/Library/
CoreServices/CoreTypes.bundle/Contents/Resources/KEXT.icns"]
because:
- NSFileTypeForHFSTypeCode('BNDL') does not work. It returns a
generic document icon.
- I haven't found an appropriate constant for
NSFileTypeForHFSTypeCode.
- I can't rely on -[NSWorkspace iconForFileType:@".bundle"] because,
for instance, as soon as Microsoft Word is installed, icons
for .bundle can display a Word bundle icon instead of the correct one.
- I haven't found so far a better solution while googling for one.
Question:
Is there a better way to retrieve the generic bundle icon?
I think you have to start by defining - for us but maybe also for
yourself - what you mean by "the generic bundle icon" because I
certainly wouldn't have assumed you meant the icon for a kernel
extension or for 'plugin (code) modules' as that icon implies. Since
there are no real implications about what the salient contents of a
bundle are, I'd've thought the generic document icon was it.
What are you really trying to illustrate with this icon? Are you sure
the Lego® block is the right thing to show?_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden