• 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: Testing an NSImageView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Testing an NSImageView?
      • From: Albert Atkinson <email@hidden>
References: 
 >Testing an NSImageView? (From: Albert Atkinson <email@hidden>)

  • Prev by Date: Camera driver ?
  • Next by Date: IB Crash
  • Previous by thread: Testing an NSImageView?
  • Next by thread: Re: Testing an NSImageView?
  • Index(es):
    • Date
    • Thread