Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Probable bug in IconRefToIconFamily() on Intel (solved)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Probable bug in IconRefToIconFamily() on Intel (solved)

On Jul 20, 2006, at 9:53 AM, Rainer Brockerhoff wrote:
I'm running into a strange issue while getting icons for symlinks and aliases on Intel machines - this is for a file browser in a Cocoa application.
Basically, I get a FSRef to the file, then call GetIconRefFromFileInfo() to get an IconRef, then convert this to an IconFamilyHandle by calling IconRefToIconFamily(). The IconFamilyHandle uses the exact data format as a standard .icns file, so I process this further to get an actual NSImage for display.

I've found a workaround (with the kind help of Steve Gehrman of Path Finder fame).

I'm now calling PlotIconRefInContext() to plot directly from the IconRef into an NSImage, instead of first converting to a IconFamilyHandle and then NSData...

...also a faster solution, it seems.

Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
 In their own business even sages err."
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

 >Probable bug in IconRefToIconFamily() on Intel (From: Rainer Brockerhoff <email@hidden>)
 >Re: Probable bug in IconRefToIconFamily() on Intel (From: Joseph Maurer <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.