How do i get NSPopover to be first responder from the NSStatusbar?

1.2k Views Asked by At

My question is simple and easy; How do i get NSPopover to be first responder from the NSStatusbar?

I'm asking for a short code, not a link to a big XCode-project. Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Though you've probably solved your question by now, you can do this:

[yourPopover becomeFirstResponder];

If you want more control, just setup your containing controller for a NSPopoverDelegate.

[yourPopOver setDelegate:self]; /* Don't forget including the <NSPopoverDelegate> in your headerfile */

Then you can use 5 functions to gain more control over your popover.

– popoverShouldClose:
– popoverWillShow:
– popoverDidShow:
– popoverWillClose:
– popoverDidClose: