Re: How to find icon file path?
Re: How to find icon file path?
- Subject: Re: How to find icon file path?
- From: Charles Srstka <email@hidden>
- Date: Tue, 23 Jul 2002 22:47:33 -0500
On Tuesday, July 23, 2002, at 09:35 PM, Ondra Cada wrote:
On Wednesday, July 24, 2002, at 04:23 , Ondra Cada wrote:
My application wants to determine whether two files use the same icon
or not, and iconForFile: won't tell me that (short of comparing all
the bitmap pixels and wasting lots of spacetime, which I'd really
rather not have to do.)
Hmmmm. You mean you get different NSImages with the same contents for
different files which share the same icon? It is possible, but I would
be surprised.
Incidentally, what do you need it for? It sounds like an *extremely*
strange goal.
If you wanna check whether different files are of the same type, well,
the -getInfoForFile:application:type: should be used here. Icons are to
be used for display only; they should not be used for any substantial
task. An icon for given file migth be different in different times
(since, eg., the user changed application assignment meanwhile, or just
installed a new app, or removed old one, or whatever)...
Perhaps his app displays the icons for a lot of files, and he wants to
speed his app up and save memory by not re-caching icons for files that
have generic icons or icons that are already cached and using the icons
he's already got stored instead of saving extra icons in RAM, making
Quartz draw them all over again, etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.