• 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: Icon question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Icon question


  • Subject: Re: Icon question
  • From: glenn andreas <email@hidden>
  • Date: Wed, 27 Jul 2005 21:25:11 -0500


On Jul 27, 2005, at 8:38 PM, John C. Randolph wrote:


On Jul 26, 2005, at 5:20 PM, glenn andreas wrote:



On Jul 26, 2005, at 6:40 PM, John Stiles wrote:



OK, now here's a stumper:
How do I get the icon for a plain old folder?


image = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')];



That'll work, but why not just use:

image = [[NSWorkspace sharedWorkspace] iconForFileType: NSDirectoryFileType];

which saves the function call?

Becuase it doesn't work? You end up getting the "plain document" icon instead... (NSDirectoryFileType being one of the things returned by getInfoForFile:application:type: which isn't the same as a "file type" that you pass to iconForFileType, which is "either a filename extension or an encoded HFS file type").




Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Icon question
      • From: "John C. Randolph" <email@hidden>
References: 
 >Icon question (From: John Stiles <email@hidden>)
 >Re: Icon question (From: Vince DeMarco <email@hidden>)
 >Re: Icon question (From: John Stiles <email@hidden>)
 >Re: Icon question (From: John Stiles <email@hidden>)
 >Re: Icon question (From: glenn andreas <email@hidden>)
 >Re: Icon question (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: NSMetadataItem mutex bug?
  • Next by Date: Re: Icon question
  • Previous by thread: Re: Icon question
  • Next by thread: Re: Icon question
  • Index(es):
    • Date
    • Thread