• 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: [SOLVED] PlotIconRefInContext doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] PlotIconRefInContext doesn't work


  • Subject: Re: [SOLVED] PlotIconRefInContext doesn't work
  • From: Michael Vannorsdel <email@hidden>
  • Date: Sat, 17 May 2008 16:46:23 -0600

Well you didn't present the secret handshake that would open immediate access to such information.

Actually, it was probably not brought up earlier as it's kind of an unsaid list etiquette rule exercised by some not to critique someone's choice of APIs unless specifically asked for. Most will try to directly address your questions or problems no matter what APIs you chose. It can be somewhat rude to flat out say your choice of APIs is folly, and sometimes presumptuous that the specific APIs were not chosen for reasons undisclosed in the original problem. If you're open for API alternatives you can state so with something like "...is there an easier or more reliable way to do this?". Otherwise some will assume you have your reasons and will do their best to help make the chosen APIs work for you.

NSWorkspace is an oft-overlooked class that contains many useful external utilities. The class name doesn't exactly scream URL launching or icon fetching, ect. Though I'm not sure what name would completely describe NSWorkspace's broad ranged functionality.


On May 17, 2008, at 3:37 PM, Mike wrote:

Adam R. Maxwell wrote:
On May 17, 2008, at 2:15 PM, Mike wrote:
I solved the problem using the IconFamily library:

http://iconfamily.sourceforge.net/
IMO, that's killing a mosquito with a shotgun :).
It just astounds me there is no support for icons in Cocoa.
You can use -[NSImage initWithIconRef:] if you only support 10.5 and later. On 10.4 and earlier you can use -[NSWorkspace iconForFileType:NSFileTypeForHFSTypeCode(kSomeIconCode)] if you only need a 32x32 icon, but it's only a few lines of code to draw an IconRef to an NSImage of the appropriate size.

Oh NOW you tell me! :-)

_______________________________________________

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: 
 >Re: PlotIconRefInContext doesn't work (From: Michael Vannorsdel <email@hidden>)
 >Re: PlotIconRefInContext doesn't work (From: Michael Babin <email@hidden>)
 >Re: PlotIconRefInContext doesn't work (From: Mike <email@hidden>)
 >Re: [SOLVED] PlotIconRefInContext doesn't work (From: Mike <email@hidden>)
 >Re: [SOLVED] PlotIconRefInContext doesn't work (From: "Adam R. Maxwell" <email@hidden>)
 >Re: [SOLVED] PlotIconRefInContext doesn't work (From: Mike <email@hidden>)

  • Prev by Date: NSLevelIndicator
  • Next by Date: Re: NSLevelIndicator
  • Previous by thread: Re: [SOLVED] PlotIconRefInContext doesn't work
  • Next by thread: Re: PlotIconRefInContext doesn't work
  • Index(es):
    • Date
    • Thread