This question is answered Not being able to edit NSTextField on NSPopover even though Editable behavior is set, but because StackOverflow doesn't allow you to comment unless you have a certain reputation I'm having to create another thread. I did exactly as explained in the answer with no luck. This is on 10.9 with Xcode 5. I added the NSWindow+CanBecomeKeyWindow.m to the build settings. Because this is a status bar only app I have Application is Agent set to YES in the plist and am not using any windows in the application. Any ideas how to implement this with Mavericks?
NSWindow+canBecomeKeyWindow.h
@interface NSWindow (canBecomeKeyWindow)
@end
NSWindow+canBecomeKeyWindow.m
@implementation NSWindow (canBecomeKeyWindow)
//This is to fix a bug with 10.7 where an NSPopover with a text field cannot be edited if its parent window won't become key
//The pragma statements disable the corresponding warning for overriding an already-implemented method
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
- (BOOL)canBecomeKeyWindow
{
return YES;
}
#pragma clang diagnostic pop
@end