Question

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.

Was it helpful?

Solution

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:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top