nukl
nukl

Reputation: 10511

NSTextField not active in NSPopOver

I have a menubar application, which open a popover. That popover contains NSTextField and few buttons. The problem is that the NSTextField is non-selectable, it's impossible to type anything in it. However, it's possible to click on it with mouse right button and paste something. Well, that's definitely odd behavior. Buttons works without any problems in that popover, btw.

Here's the code i use:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [NSApp activateIgnoringOtherApps:YES];
    statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];
    [statusItem setAction:@selector(showPopOver:)];
    [statusItem setImage:[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"]]];
    [statusItem setHighlightMode:YES];
}

and:

- (IBAction)showPopOver:(id)sender {
     popover = [[NSPopover alloc] init];
     [popover setContentViewController:popOverController];

     popover.animates = YES;
     popover.delegate = self;

     [popover showRelativeToRect:[sender bounds] 
                          ofView:sender 
                   preferredEdge:NSMaxYEdge];

    }
}

Any ideas what the problem exactly and how to fix it?

Upvotes: 3

Views: 1417

Answers (1)

agent-10
agent-10

Reputation: 361

Seems is a bug. http://openradar.appspot.com/9722231

Upvotes: 1

Related Questions