NSStatusItem with NSPopover - MBS?

I want to be able to click an NSStatusItem and instead of a menu appearing, I want to get a native NSPopover to show. Lots of apps do this. http://dayoneapp.com springs to mind. I can make the NSStatusItem using declares, dtPlugins, MBS, whatever.

I’m almost certain I played with this NSStatusItem + NSPopover years ago with the MBS plugins and I’m equally (almost) certain there was a thread discussing it but I’ve searched and can’t find anything relevant. If I remember correctly, the problem was getting the positioning of the NSStatusItem so that the NSPopover is displayed in the right place. I’d also like the NSStatusItem to be remain highlighted until the popover is dismissed but I’m sure that’s the simple part.

I’ve avoided buying MBS for years but I’ll buy it tonight if it can be done natively and someone can give me a working example, it would save me faffing around for another hour or two! Thanks for any pointers or better yet, that example!

well, try the plugin.

You can have a click event and show a popup.
The classes should be all in the plugin.

Good night for now.

Which OS versions are you targeting? With Mavericks or lower you can attach a NSView to a NSStatusitem and show the popover from that. Otherwise you can use .button property and attach a popover to that.

Gavin, I just mailed you an example project.

It’s late, so it’s more quick & dirty.
But you can certainly build on it!

[quote=239694:@Christian Schmitz]Gavin, I just mailed you an example project.

It’s late, so it’s more quick & dirty.
But you can certainly build on it![/quote]
I appreciate that Christian, thanks. I didn’t get any coding time today (my week old baby continues to eat into Xojo time!) but I’ll hopefully get some hours in tomorrow to check it out.

If you have dtPlugins it is possible too.