Re: or Using NSImage... [was: Re: Using NSBundle]
Re: or Using NSImage... [was: Re: Using NSBundle]
- Subject: Re: or Using NSImage... [was: Re: Using NSBundle]
- From: Ryan Britton <email@hidden>
- Date: Sat, 19 Nov 2005 09:08:44 -0800
Since that image is contained in your package, you could also use
something like this instead:
NSImage *image = [NSImage imageNamed:@"oxford-physics-apple"];
On Nov 19, 2005, at 8:54 AM, Heinrich Giesen wrote:
On 19.11.2005, at 16:27, Graham J Lee wrote:
- (void)startAnimation
{
[super startAnimation];
[theImage initWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:@"oxford-physics-apple" ofType:@"png"]];
[theImage setSize:aSize];
}
Your initialization of "theImage" looks very strange. If "theImage" is
an object of NSImage (how was it created?) it should read:
NSImage *theImage = [[NSImage alloc] initWithContentsOfFile:....];
HG
--
Heinrich Giesen
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden