Re: Can't set image in NSImageView
Re: Can't set image in NSImageView
- Subject: Re: Can't set image in NSImageView
- From: Jens Bauer <email@hidden>
- Date: Sat, 7 Feb 2004 06:46:32 +0100
Hi,
On Saturday, Feb 7, 2004, at 05:59 Europe/Copenhagen, email@hidden
wrote:
- (IBAction)mystart:(id)sender
{
// [statusImage setImage:@"onstate.png"]; // doesn't work
NSString *myImage;
myImage = @"onstate.png";
[statusImage setImage:(NSImage *)myImage];
[actionButton setTitle:@"Stop"];
[actionButton setAction:@selector(mystop:)];
}
I think you want to...
{
[statusImage setImage:[NSImage imageNamed:@myImage]];
[actionButton setTitle:@"Stop"];
[actionButton setAction:@selector(mystop:)];
}
Love,
Jens
_______________________________________________
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.