I am using XCode 11.2. I created an NSViewContoller with a loaded nib file and added the view to NSSavePanel. The view displays and the NSTextfields in the view are there but they never connect to the view controller. Tried all sorts of things to force connection but nothing happens. I have used accessory views many times before with NSOpenPanel with no issue, but this is really got me stumped. Is this a bug in XCode 11.2 with Catalina?
My code looks something like this:
MyViewController *mvc=[[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
NSView *av=[mvc view];
NSSavePanel *panel=[NSSavePanel savePanel];
[panel setAllowedFileTypes:[NSArray arrayWithObjects:@"tif", nil]];
[panel setExtensionHidden:NO];
[panel setMessage:@"Save the original file."];
[panel setAccessoryView:av];
if([panel runModal]==NSModalResponseOK){
NSString *someText=[mvc textView]; // this is always nil
...
....
The view controller has the textView connected using IB - it all looks ok but the textView is always nil at runtime. The method [mvc textView] returns a string from the NSTextView. When I look at it in the debugger the NSTextView is nil - that is, it never gets connected. How do I force it to?