title: displaying an image in cocoa
body: <p>I am totally new at this, but here goes:
  I want to press a button in my application, and have an image display (I am planning to read it off of a camera, but to start with, I will open a .TIF file.)  However, within the interface builder, I can make buttons within an NSObject object, but the literature makes it sound like I need to make an NSView object to display a file.  The problem is, when I do this, the NSObject object does not seem to talk to the NSView object.  I am trying to do something like:</p>
  
  <pre><code>    NSString *inFilePath;
      inFilePath = @"/Volumes/Data/Temp/Smiles.tiff";
      NSImage *TestImage = [[NSImage alloc] initWithContentsOfFile:inFilePath];
      [MyView setImage:TestImage];
  </code></pre>
  
  <p>Here, MyView is the NSView object.  I get warnings that MyView may not respond to setImage.  I have tried to define an IBOutlet within the NSObject object, and although I can connect it within the interface builder, console gives me the error:</p>
  
  <p>unrecognized selector sent to class 0x1e080</p>
  
  <p>So, it's not clear what the next step is.  Is there an easy way to get two different objects to "talk to" each other?
  Thanks</p>