Menubar behavior different on El Capitan

I am showing different menubar behavior between MacOS 10.11 (El Capitan) and 10.14 (Mojave) using Xojo Desktop 2018r3.

I wanted to use a different instance of a menubar for a window. I originally set this up on Windows where the menubar is associated with the window.

In the open event of the window where I want the menubar to be different, is something like this:

Dim myMenu as MenuBar = New MainMenuBar myMenu.Remove(myMenu.Child("ViewMenu").Child("File_Users")) self.MenuBar = myMenu

This code works perfectly in Mojave and WindowsOS but the menubar does not change in El Capitan.

Is there some workaround for this behavior?

It may be that this function uses API that is simply not available on macOS 10.11, or it may be a bug in El Cap.

Personally as a Mac developer, I’ve never actually tried to use different menubars for different windows, because there’s only one menubar on the Mac, it’s not common behavior to have it swap (although to have different items available in different windows is okay). I understand that on Windows, the menubars are attached to each window, so it makes sense there.

I ended up modifying the main menu on the Mac and using the different menubars on Windows. That seemed to work well. I just have to remember that if I change something on the MacOS, I have to make the same change on the WindowsOS.

Thanks.