• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iconForFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iconForFile


  • Subject: Re: iconForFile
  • From: Daniel Jalkut <email@hidden>
  • Date: Fri, 24 Jan 2003 10:26:48 -0800

I asked a very similar question not too long ago, and got this response from Andrew Platzer:

http://cocoa.mamasam.com/COCOADEV/2003/01/1/53565.php

Getting rid of the extra representations did make a huge impact on the performance problem for me.

Danile

On Thursday, January 23, 2003, at 02:15 PM, Lorenzo Puleo wrote:

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.
_______________________________________________
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.

References: 
 >iconForFile (From: Lorenzo Puleo <email@hidden>)

  • Prev by Date: Re: Nib Stripping
  • Next by Date: Re: Nib Stripping
  • Previous by thread: iconForFile
  • Next by thread: Old style pathname
  • Index(es):
    • Date
    • Thread