iconForFile
iconForFile
- Subject: iconForFile
- From: Lorenzo Puleo <email@hidden>
- Date: Thu, 23 Jan 2003 23:15:58 +0100
Hi,
I built a contextual popUp menu containing a pathname, just like the popUp
menu you can see when you click (holding down the Command key) on the folder
name of a window in the Finder. Or clicking on the file name that appears on
the window bar of an open file.
Everything works ok, but I noted that when I add the icon of the file to
each menuItem using the APIs
icon = [workSpace iconForFile:tempPath];
[menuItem setImage:icon];
this slow down the building of the contextual menu.
I investigated on this problem and I suppose that the API iconForFile is
responsible of this. It's too slow at retriving the NSImage.
Also I am forced to resize the icon using
[icon setSize:NSMakeSize(16.0,16.0)];
otherwise the icon in the contextual menu results 32x32 sized.
Do you know some faster procedure?
Thank you.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.