OS X application menu bar not showing correct title - macos

I have a OS X application. The app works fine, and the first menu item is the app's title, "Elision". However, under the "Elision" and "Help" menus, the title displayed is "Test". How do I change this?

Open the xib or storyboard file containing the menu, and select the menu item(s) you wish to change. You may set the menu item titles as desired via the Inspector:

Related

Mac catalyst: change menu item name

Ho can I change the title from a menu entry in a catalyst app.
Let's say I wanna change the menu item title from File/About to File/About app

macOS main menu sub items don't show

I'm using storyboard to create a macOS app.
For some reason, when running the app, the sub-menu item doesn't show up at all.
The item is enabled and hooked to the first responder just like the original demo items.
Did you drag one of the special menus by mistake? The Clear Menu item makes me wonder if the menu started life as a Recent Items menu and perhaps the change didn't take. You can tell by opening your storyboard as source code and checking for the systemMenu attribute on your Scale menu:
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="...">

Display NSPopover above dock icon

How can I display an NSPopover above my app's dock icon?
There are two ways to customise the dock menu, based on if your application is running or not. See the Apple documentation for customising it when its open here:
http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/customizing_docktile/docktasks_cocoa/docktasks_cocoa.html#//apple_ref/doc/uid/TP30000986-CH3-SW1
To summarise, you basically provide a menu in the main application's XIB or storyboard which contains the extra menu options that you want to add to the dock menu.
To customise your Dock icon's menu when the application is not running, see the guide here:
http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/customizing_docktile/CreatingaDockTilePlug-in/CreatingaDockTilePlug-in.html
Basically, you need to create a plugin which you drop into your application's resource folder. This works very like the original method, but executes inside Finder's dock process.

Changing the Save (saveDocument:) menu text

In our Cocoa NSDocument-based application we have a Save (saveDocument:) button on a context menu, but we want the text of the menu-item to change depending on the circumstances of the NSDocument, in the same way that the main menu Save (saveDocument:) menu-item changes. Does anyone know a clean solution to update this menu-item text, ideally calling on the same Cocoa functionality that the main menu uses?
Details:
The main menu in a Cocoa NSDocument-based application usually has a Save menu item that fires First Responder - saveDocument:. The title of this menu item changes depending on the circumstances of the document, for example:
In Lion (OS X 10.7) the menu-item text starts out as 'Save', but becomes 'Save a Version' (eg after the document has been saved).
In Mountain Lion (OS X 10.8), the menu item text starts out as 'Save...', but because 'Save' (eg after the document has been saved).
In our app, we display a context menu with a Save menu-item, and so we want the text to change in the same way as in the main menu (listed above). We don't want to have to write code that contains complicated logic (check the NSDocument... check the OSX version and show a string accordingly) and we are really looking to be able to call the same code that the Cocoa main menu uses to change the menu-item title.

Hiding NSMenu while the dock remains active

I want my app to show his menu on launch only if the user didn't open a file. Now I can't seem to make it work. Hiding the menu makes the dock and the status bar invisible. I want them to still be there, but not with my own menu (e.g. if you open a file from finder, the finder menu is still visible, but my app opens a window that handles the file, and quits if the user cancels or on completion).
I probably didn't explain it well enough, but here's what I did to solve it :
Add this line to the plist of my app (this produces an app without dock icon or menu), the dock and the menu bar will still be there, but won't be changed by the app :
LSUIElement
(And set the checkbox to true).
This makes your app UI-only (it doesn't show his NSMenu nor does it add an icon to the dock, but just shows your GUI.

Resources