Remove 'Show/Hide tab bar' menu item - macos

The latest version of macOS Sierra adds a 'Show/Hide tab bar' menu item to the 'View' menu.
It does this dynamically.
My application already includes its own tab bar using the MMTabBarView library. I would prefer to continue using this library as it gives me backwards compatibility with tabs, plus the ability to do some customization to tabs.
I'm not seeing anything in apples NSDocument or NSDocumentController documentation on removing this menu item.
Does anyone have any suggestions as to how I can remove it?
NOTE: I do not want to simply disable it, I am looking to remove it completely. (Or I guess not have it added in the first place).

In Interface Builder, open the attributes of your NSWindow and you'll see an option called "Tabbing Mode". Set it to Disallowed.

Related

manual option is not showing in Xcode 11 assistant editor and how to add IBOutlet?

I recently updated to Xcode 11 and some of its user interface changed. in older version of Xcode there was options of accessing files in assistant editor using automatic or manual. but in this version of Xcode I can't see any manual option in assistant editor. so I am not able to add IBOutlet and IBAction methods to particular storyboard.
so can anyone tell me how to add these actions and outlets, that would be great help. thanks
By pressing the above button, Xcode will split the view and allow you to select a custom file using the file tree at the top.
You are correct.
The Manual option is no longer visible. You can still achieve the same result by doing a quick open using Cmd+Shift+O then type the name of any file you want to open. Press the Alt key and the file will open in the Assistant Editor Window.
As others have noted the new add editor button allows you to add new editors and open files into them. You could file a bug report but you may want to consider that you're likely to get a "works as designed" type of reply.
You can always change or add new keyboard shortcuts to get the behavior you want by viewing the preferences key bindings area and search for the command you want to shortcut.
Note
You can still ctrl+drag from storyboard to the class by the Adjust
Editor button in the upper right of the storyboard. Then just select
Assistant Editor on the list. After which you can make IBOutlets/IBActions.
open your storyboard, hold option key and select the file you want
In the documentation outline of storyboard, try to choose the "correct" item, which you want to set up outlet connections. Say you want to set up an outlet connection for cell of table/collection view.
View Controller > Collection View > Cell > Content View > Image View.
Try to select Cell, "Content View" or "Image View", then check the jump bar of assistant editor, you're probably able to switch to the .swift file you want.
Reference

Cocoa menubar programmatically with NSMenu, how to get standard items "Services", "Hide App", "Hide Others", "Show All" etc

In decarbonizing I have now come to creating a menubar programmatically using NSMenu.
Carbon seems to be so nice to add standard items to the application menu: Services, Hide app, Hide Others, Show All, Quit app,
and they are even added using the user’s Preferred Language setting in System Preferences’s Language & Region,
so in German Hide Others is added as Andere ausblenden.
I only had to add the About and Preferences items.
However, it seems that in Cocoa I have to add these standard items myself,
but how can I find out what Hide Others is called in the user’s Preferred Language ?
And what is the Cocoa equivalent of CreateStandardWindowMenu ?
If you have Xcode create a new Cocoa application project, it will make a MainMenu.xib that you can examine. It looks like "Hide Others", "Quit" etc. are just menu items with particular actions assigned, but "Services" seems to have some special magic. Even if you don't want to present a whole menu bar from a nib, you could load it from a nib and then pick out certain menu items and move them to another menu, rename them or whatever. Though I'm not sure I understand what you're trying to accomplish. Even if you don't want to localize, you can use a nib.
To address the last part of your revised question, the NSApplication object has a windowsMenu property, i.e., you could create a menu and say [NSApp setWindowsMenu: myMenu]. But I don't know if that adds items like Bring All to Front or if you must create those yourself.

Callers doesn't appear in Related Items menu

Lately in Xcode 5.1.1, my Related Items menu (Control-1) doesn't list Callers.
Is there a workaround to make it appear again?
The listing in the menu is content related.
So in Storyboard no Callers are given.
In a code module (.m) the list does nicely appear in my Xcode 5.1.1
In my case the issue was the Version editor was open. (e.g. Comparison, Blame, Log.)
When the version editor is open, Callers doesn't show up in the context menu.

Using edit menu commands from menu bar app

I have an app which is run from the menu bar only (LSUIElement is set in the info.plist) which means there is no main menu except the menu I attached to the status item. The problem is I would like to enable some edit commands when using an NSTextView (like command-c to copy) but all command keys seem to be disabled since the app is technically not active (I get beeps when trying any key combinations).
Is there anyway to add a standard edit menu somewhere and enable command keys that would redirect to it? I'm thinking there could be a hack to make the app temporarily active or something but I can't figure anything out.
Thanks.
They're not disabled. They're gone, because you deleted them.
You need to put back your Main Menu.
If you use version control, you may be able to resurrect it from the past using that. If not, you'll have to create a new project, copy anything custom from your Main Menu nib (if you even still have one) into that one, and move that nib into your actual project to be your new Main Menu nib.
The Edit menu commands, window-related commands (e.g., Close), and numerous other commands all live in the Main Menu. If you delete the Main Menu, you don't have those features anymore.
Your Main Menu isn't visible in a UI element app, but that's not a reason to delete it—it's a reason to keep it, even though your app won't have the menu bar, because not being visible means that it won't peek out from behind the curtain but will remain there keeping the magic of your keyboard shortcuts working.

Where did the "Search in Project" context menu item go in Xcode 4?

When you selected text in the code window and right-clicked on it, you would get a context menu with an option to "Search in Project" for the selected text. (Xcode 3.x)
Anyone knows how I can achieve the same in Xcode 4? Or a keyboard shortcut?
Now I select the text and wrestle my fingers in the following combination CMD-C, CMD-CTRL-F, CMD-V, RETURN. Feels a bit like playing the Playstation...
Cheers,
Niels R.
There doesn't seem to be a single keyboard shortcut, but one you might find useful is "Use Selection for Find" (Command+E). That is, you can select some text, and press Command+E, Command+Shift+F, Return.
It's no longer in a menu option but is accessible by an icon. Look directly beneath the "Schemes" at the sequence of 7 small icons. The 3rd one over is a "search" icon. Click that icon and type in your project search text and press return.
Just think it might be handy to see it at a glance:

Resources