RE: imageNamed cannot load an image
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