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."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
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