title: Setting an image on NSImageView
body: <p>I'm having a problem with my program. Basically what i want is, i have 2 nssecuretextfield and i have a button. if both are equal, it shows one image on the nsimageview, if not it displays other image. This could be very easy, but i'm new to mac programming,</p>
  
  <p>the .h file:</p>
  
  <pre><code>IBOutlet NSSecureTextField *textField;
  IBOutlet NSSecureTextField *textField2;
  IBOutlet NSImageView *imagem;
  }
  
  - (IBAction)Verificarpass:(id)sender; 
  </code></pre>
  
  <p>the .m file:</p>
  
  <pre><code>- (IBAction)Verificarpass:(id)sender;
  {
      NSString *senha1 = [textField stringValue];
      NSString *senha2 = [textField2 stringValue];
      NSImage *certo;
      NSImage *errado;
      certo = [NSImage imageNamed:@"Status_Accepted.png"];
      errado = [NSImage imageNamed:@"Error.png"];
  
      if (senha1 == senha2) {
      [imagem setImage:certo];
      }
      if (senha1 != senha2) {
          [imagem setImage:errado];
      }
  }
  </code></pre>
  
  <p>can anyone help me please?
  i tried and it only displays 1 image, even if its right or wrong.</p>