• 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
+{NSImage imageNamed:fromBundle:]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

+{NSImage imageNamed:fromBundle:]?


  • Subject: +{NSImage imageNamed:fromBundle:]?
  • From: glenn andreas <email@hidden>
  • Date: Fri, 11 Jan 2008 14:10:04 -0600

NSImage's +imageNamed: is documented as searching the named images cache, the apps main bundle, and then the AppKit framework bundle. Unfortunately, I've got code in a private framework that wants to get the image stored that framework (which isn't thus searched).

Is there some way to add a framework to this search path? (Which would be best, because it will allow any object, such as a button, that has an image name to automatically work correctly) Or at least a way to explicitly pass a bundle to search (via a hypothetical +imageNamed:fromBundle:). The fall back, of course, is to get all the possible file extensions from NSImage and manually try each and every one of them, but I'd rather not have to duplicate this logic (plus this fails to support the generic button using a named image that resides in the private framework)...

I suppose I could also, at startup, go through all the images in the framework, load them, and then do a "setName:" to get them in the cache (but this seems like it could impact program launch times)

Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures, fractals, art



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: +{NSImage imageNamed:fromBundle:]?
      • From: Ricky Sharp <email@hidden>
    • Re: +{NSImage imageNamed:fromBundle:]?
      • From: David Spooner <email@hidden>
  • Prev by Date: Re: NSTextfield value doesn't update binding when set programmatically
  • Next by Date: Re: NSArrays and NSArrayControllers
  • Previous by thread: Re: NSArrays and NSArrayControllers
  • Next by thread: Re: +{NSImage imageNamed:fromBundle:]?
  • Index(es):
    • Date
    • Thread