More MacOS questions

Please ignore if you find questions from a MacOS newbie annoying…

In a multi-window app, what’s the “approved” method of window-specific menus appearance? (In Windows it’s a non-issue because the menus are attached to each window)

If, when opening a dialog that has it’s own menubar should the menubar (bold) name change, or should it stay the same as the main menubar, but just have the menu items change? Should maybe there be one menubar only that has greyed out menu items for the dialog that enable when the dialog opens?

I was looking for an example program, but most software I have doesn’t seem to change menus or add/remove menu items when a dialog is opened…

Help a brotha out!

The menu item stays static to not confuse people and enables/disables options.

Thank you, @MonkeybreadSoftware.

So, only one menubar for the entire application?
Xojo allows a per window menubar, is that designed for Windows and Linux only?

1 Like

On Mac you can specify a menubar per window and the menu can switch if you switch windows.
But that can confuse people.

This is normal
The Apple HIG guidelines are a decent read for ideas on how a “proper” mac app should behave
Normally they dont swap the menu bar

https://developer.apple.com/design/human-interface-guidelines/macos
specifically
https://developer.apple.com/design/human-interface-guidelines/macos/menus/menu-anatomy/
and following sections

More or less
There are some limited circumstances where you will see a different menu bar for an app But they arent that common

1 Like

I went through those docs and didn’t see anything about multi-windowed apps specifically.

I have one app that changes menus when going to it’s Options/Preferences, but you’re saying that’s uncommon?

Video of Reaper menus

For preferences dialog, there is no menu change. It’s just a dialog and doesn’t need a menu in my opinion.

Sure - there are examples that do this
I’m sure I could find others
As a general principle though macOS apps dont tend to switch menu bars based on what window is open
They are more likely to enable & disable menu items depending on what windows is open
Hence the principle noted in the Menus docs about

Keep menus enabled even when menu items are unavailable.

1 Like

Thank you @npalardy and @MonkeybreadSoftware!

1 Like

Not really.

On Windows every time you load a document it is loaded into a separate rump app (where less common functions are loaded on demand), so if you open 5 pdfs you have 5 instances of Adobe Acrobat running, apps that use a multi-document approach are uncommon.

On Mac all documents are loaded into one app. So if you open 5 pdf you have 1 instance of Adobe Acrobat (or Preview) running. Consequently you have 1 toolbar.

While the “Windows way” seems nicer at first glance, it is also a resource hog. I have seen Windows PCs struggle with opening many documents that my much less powerful MacBook Pro from 2010 handled without problems.

MS has been encouraging developers to move to this model as well - probably to avoid the resource hog behaviour of running multiple instances

Source?

Until recently this was often the case with many apps
No source required - just open several documents
MS has started revising their advice to developers and has made Word Excel etc NOT do this an operate more like they do on macOS where a single instance would have many open documents
For instance, on Windows 7 if I use notepad to edit two different batch files this is what I see in task manager

Note there are 2 copies of notepad running
Windows 10 does the same with Notepad

MacOS generally only runs one instance regardless of how many documents are open and you have to actually take special measures to run several instances

Source?

Adobe Acrobat was mentioned earlier. It does not work that way on my old Win7 machine. It has a single instance no matter how many documents I open.

Notepad is a VERY old app, so that’s not surprising. Seeing multiple processes in Task Manager for 1 piece of software does not necessarily mean it’s opened multiple copies of itself, it can be that this program has several parts that work together. I only have one copy of DropBox, but it breaks out into 3-4 processes in Windows. Multi-threaded apps I’ve written have many separate processes, but they are still a single app.

I’m not claiming to be an expert on this subject, just looking for sources to the information you’ve provided, as my experience doesn’t jive with what you guys are saying.

I find it sometimes frustrating when 2 instances of a program CANNOT be started.

I had a hardware editor that originally allowed multiple instances to run. I was able to run 2 instances of the editor on one pc, connected to 2 different pieces of hardware and I could drag/drop settings, libraries, and other things between instances to transfer between the hardware devices. VERY handy.
When they brought out the Mac version, they stopped that capability. Now you have to export, connect too the other hardware device, re-synchronize (taking a long time), import the data, etc. big PITA.
I expect they simply weren’t able to easily open 2 instances in MacOS for that software. No idea what it’s written in.

I dont know when various vendors started making their apps NOT open multiple times
It definitely was a normal way of working
For instance
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other-mso_o365b/excel-2016-open-all-files-in-one-instance/3792d5ae-3d03-4251-9abd-eb81d64e8fde
https://support.microsoft.com/en-us/help/291313/a-new-instance-of-word-appears-to-run-when-you-create-or-open-an-addit

macOS apps operate in what MS terms “single document interface” (SDI) and mostly always have
That some developers dont do this well is that developers issue
Since its not “normal” for an app to run multiple instances its not obvious how you can force the mac to do this - but you can

open -n -a "APPLICATION NAME"

and replace application name with whatever app you want and then the -n option says “start a new instance”

Understood. @MarkusWinter was implying that all Windows programs (using Acrobat as an example) open separate instances (“rump app”?) for each document, which I don’t feel to be true.
In reality, I think that’s pretty rare. In fact, I would like to see an example of ANY document-based program that opens multiple copies of itself when opening multiple documents. Even MS office does not open separate instances for each document ON ITS OWN. I just checked with Office 2010. The link you posted looks like a bug that wasn’t there before or after that version of Office 2013.

notepad does not open multiple instances of itself on it’s own, it cannot handle more than 1 document at a time. Any program that isn’t document-based or cannot open more than 1 document at once will of course not be able to have a single instance with multiple documents open, by design.

The ability to open multiple instances of a program is very useful, but I would suggest that any document-based app in Windows does NOT open multiple copies of itself when loading more than one document.

I appreciate the fact that you can open more than one instance of a program via commandline on MacOS. Great tip!

ALL document based software should be single-instance for multiple documents, BUT also be able to be opened as separate instances if needed. (IMHO)

I think its more historical than anything now
This started around the Windows 95 time frame
https://docs.microsoft.com/en-us/cpp/mfc/sdi-and-mdi?view=vs-2019
But not all apps moved to SDI
Some remained launching separate instances - one per document - for a long time

Like?

Notepad :slight_smile:
Wordpad (try getting more than one document open in wordpad at a time I cant unless I run multiple instances)