Window-specific menubar in 64-bit build

I have a Xojo 2016r3 project which has two menubars defined. One is assigned to the application object, and the other is assigned to one of the windows. Under Mac OS X versions prior to El Capitan, this window-specific menubar works as intended - it replaces the application menubar as soon as the window is displayed.

However, under El Capitan and Sierra, it does not appear until the user attempts to access one of the application menubar items, at which point the menubar flashes, and gets replaced by the window-specific one.

This problem only appears in a 64-bit build, though. It works as it used to in a 32-bit build.

Is this a bug, and is there a way to “tickle” the menu bar to get it to replace the application menubar as soon as the window opens?

Have you tried to change App.Menu instead of Window.Menu ?

Thanks, Michel,

I haven’t tried doing it instead, but I have tried setting the application menubar to the same window-based one in the window’s open event, and then setting it back in the close event, but that doesn’t help. I’ve also tried calling the “enable” method of the desired menubar and setting the visible properties of the two menubar in those same events - to no avail…

That calls for a bug report.

in the meantime, you will probably have to modify the menu in code.

I quickly tried it in an empty project with a window and an AppMenuBar assigned to App.MenuBar and a WindowMenuBar assigned to Window1. When opening Window1 the WindowMenuBar immediately shows and when closing Window1 it is immediately replaced with AppMenuBar.

Xojo 2016r3 and compiling to 64bit for OS X 10.11.6.

Thanks, Eli. I was just about to try and create a small test project like that. Your configuration is identical to mine, so it may be something else in my project, though I don’t know where to start to try and figure it out, especially since it does work as expected in the 32-bit build…

I did a quick test, and indeed, it works.

Thanks again, Michel and Eli for taking the time to test it. It works for me in a test application as well. Now I’m off to try and figure out why it doesn’t work in my “real” project…