FROM : Adam R. Maxwell
DATE : Sat May 17 23:31:22 2008
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.
--
adam
DATE : Sat May 17 23:31:22 2008
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.
--
adam
| Related mails | Author | Date |
|---|---|---|
| Michael Vannorsdel | May 17, 17:06 | |
| Michael Babin | May 17, 17:29 | |
| Mike | May 17, 22:16 | |
| Mike | May 17, 23:15 | |
| Adam R. Maxwell | May 17, 23:31 | |
| Mike | May 17, 23:37 | |
| Uli Kusterer | May 18, 00:16 | |
| Michael Vannorsdel | May 18, 00:46 |






Cocoa mail archive

