Re: Testing an NSImageView?
Re: Testing an NSImageView?
- Subject: Re: Testing an NSImageView?
- From: Scott Anguish <email@hidden>
- Date: Sun, 1 Sep 2002 18:49:24 -0400
On Sunday, September 1, 2002, at 06:17 PM, Albert Atkinson wrote:
Greetings!
How would I go about testing an NSImageView to see if it contains a
certain image? I have tried the following two lines of code:
if ([[well1 image] isEqualTo: @"Off"])
The first shouldn't work because you're comparing an NSImage to an
NSString..
> and
if ([[[well1 image] name] isEqualToString: @"Off"])
name will only work if the NSImage was assigned the name using
setName:, or loaded using imageNamed:
How are you loading it?
You might be better off keeping the instance elsewhere to compare
against..
_______________________________________________
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.