I've subclassed NSViewController with IBOutlets hooked into an NSButton in a secondary nib.
I can instantiate the NSViewController and apply the view in an NSMenu -- it works great -- but how do I access the button to change its title?
Since the NSViewController has IBOutlets, I assumed I'd do this through the controller.
//this part works great
NSViewController *viewController = [[toDoViewController alloc] initWithNibName:@"toDoView" bundle:nil];
NSView *newView = [viewController view];
newMenuItem.view = newView;
//this part not so much
[viewController [toDoButton setTitle:someStringHere]];
Any pointers on where to go from here?
Edit to add: the toDoViewController class --
@interface toDoViewController : NSViewController {
IBOutlet NSButton *checkBoxButton;
IBOutlet NSButton *toDoButton;
}
@end