• 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: imageNamed cannot load an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: imageNamed cannot load an image


  • Subject: RE: imageNamed cannot load an image
  • From: "Christopher Hickman" <email@hidden>
  • Date: Wed, 21 Mar 2007 16:46:12 -0400

>> 	NSImage *BackgroundImage = [NSImage imageNamed:@"SpaceOscillator"];

>
>Try using @"SpaceOscillator.png"

From
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Clas
ses/NSImage_Class/Reference/Reference.html:
When looking for files in the application bundle, it is better (but not
required) to include the filename extension in the name parameter. When
naming an image with the setName: method, it is also convention not to
include filename extensions in the names you specify. That way, you can
easily distinguish between images you have named explicitly and those you
want to load from the application's bundle.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: imageNamed cannot load an image
      • From: Artemiy Pavlov <email@hidden>
References: 
 >imageNamed cannot load an image (From: Artemiy Pavlov <email@hidden>)
 >Re: imageNamed cannot load an image (From: Kevin Hoctor <email@hidden>)

  • Prev by Date: Re: imageNamed cannot load an image
  • Next by Date: Re: Why does (id <MyProtocol>) have to be id?
  • Previous by thread: Re: imageNamed cannot load an image
  • Next by thread: Re: imageNamed cannot load an image
  • Index(es):
    • Date
    • Thread