title: NSOpenPanel - Set file type?
body: <p>Just looking on what I would use to only allow specific files to be selected (Images for now)</p>
  
  <p><code>setFileTypesArray</code> returns </p>
  
  <blockquote>
    <p>NSOpenPanel may not respond to -setFileTypesArray: </p>
  </blockquote>
  
  <p>and then the panel doesn't open up at all.  Heres my code:</p>
  
  <pre><code>    NSArray  * fileTypes = [NSArray arrayWithObjects:@"png",@"tiff",@"baz",nil];
  
  NSLog(@"Button Pressed");
  [textField setStringValue:@"Test"];
  int i; // Loop counter.
  
  NSOpenPanel* openDlg = [NSOpenPanel openPanel];
  
  [openDlg setCanChooseFiles:YES];
  [openDlg setFileTypesArray:fileTypes];
  </code></pre>
  
  <p>Thanks.</p>