I have changed my Print menu item to send the -printWindow: message to First Responder and defined that method on two of my window controllers (my primary and a secondary window). On my primary window, everything works fine. However, when I focus on the second window the Print menu item is being automatically disabled.
@interface SecondaryWindowController : NSWindowController {
}
- (IBAction) printWindow:(id)sender;
My implementation:
- (IBAction) printWindow:(id)sender {
NSLog(@"called print:%@", sender);
}
If I understand auto validation of menu items, it should climb up the first responder hierarchy looking for an object that responds to the chosen selector... which should be my SecondaryWindowController, but the menu item is disabled. Any idea what I'm doing wrong?