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: Etienne Guérard <email@hidden>
- Date: Tue, 11 Nov 2008 12:17:23 -0500
- Thread-topic: How are we supposed to retrieve the generic bundle icon?
Did you take a look at IconServices GetIconRef() function using one of the generic Finder icons constant?
-------- Message d'origine--------
De: cocoa-dev-bounces+eguerard=email@hidden de la part de Iceberg-Dev
Date: mar. 11/11/2008 17:36
À: email@hidden
Objet : How are we supposed to retrieve the generic bundle icon?
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?
_______________________________________________
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
------------------------------------------------------------
This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. DxO Labs et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.
_______________________________________________
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