Joseph Quigley
Joseph Quigley

Reputation: 346

Re-create Cocoa application menubar

I'm making a statusbar application and load a new xib containing the main window for the application when clicking on a statusbar menu item. However, in the process I deleted the application menu bar. I don't see a way to hook up the NSMenu object I created in the interface builder.

The window loads just fine, and the status bar icon is still present, but when I make the main window the key window, the application menu bar doesn't change, it just shows the previous app that was active.

I have followed the instructions/suggestions here and here, but neither of them work. Is there some other step I've missed?

Thanks!

Upvotes: 3

Views: 320

Answers (1)

user149341
user149341

Reputation:

The behavior you're describing is normal for background applications. If you don't have an icon in the Dock, you don't get your own menubar, even if you have a window in the foreground.

Upvotes: 2

Related Questions