• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Alternative to NSWorkspace iconForFileType for icons?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative to NSWorkspace iconForFileType for icons?


  • Subject: Re: Alternative to NSWorkspace iconForFileType for icons?
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 24 Feb 2009 21:32:48 -0600

On Feb 24, 2009, at 5:57 PM, Kevin Walzer wrote:

As I read it, the iconForFileType and related methods form NSWorkspace returns an NSImage. I don't want an NSImage. I want the path to the 'icns' file that the iconForFileType NSImage is based on.

What makes you think that all icons come from free-standing icns files?


Am I missing something in Cocoa here? Can anyone suggest an alternative API/class/method to me?

I don't believe the API you're looking for exists. My first thought was to check Launch Services, but the icon-related stuff in there is documented as no longer being used. After that, I checked Icon Services. There are functions there to obtain an IconRef for a given item in the file system, but there doesn't appear to be a way to obtain a reference to the file that that icon comes from, if there is even such a file.


Regards,
Ken

_______________________________________________

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


References: 
 >Alternative to NSWorkspace iconForFileType for icons? (From: Kevin Walzer <email@hidden>)

  • Prev by Date: do i need to create autorelease pool?
  • Next by Date: Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
  • Previous by thread: Alternative to NSWorkspace iconForFileType for icons?
  • Next by thread: Core Data Relationships
  • Index(es):
    • Date
    • Thread