• 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
iconForFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: iconForFile
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Subviews
  • Next by Date: Old style pathname
  • Previous by thread: Small resize icon
  • Next by thread: Re: iconForFile
  • Index(es):
    • Date
    • Thread