I’ve been testing MenuBar in my Mac and it works fine until I build it for other platforms like Windows. In Windows, it is disabled.
Now when I use Xojo on Windows and build for Mac, it is enabled but it does not do anything, no methods I have set is being run, tried adding breakpoints but it does not click. Is this a bug or is there something I should do to make it work on multiple platforms?
Thanks in advance.
Some unclear points for me about your question:
What is disabled in Windows? The whole menu bar, a specific menu or one menu item?
I assume you’ve added menu item handlers. Are you saying you put breakpoints in the handlers and those are called on Mac but not on Windows?
What does not click? I’d think it’s you or another user who click somewhere.
Normally, if a menu handler is executed on one OS, I hardly see a reason to not be executed on another (if sticking in Xojo).
I was referring to the MenuItems, it’s clickable/enabled on Mac but on the Windows version of my app it is disabled.
Ok, where did you put your menu handlers? (I mean, in what object).
I set my menu to None in the App and set it on my Window which my project only has one window.
I was referring to the menu handlers, not the menu bar (albeit it’s a good thing you mentioned how you assign your menu bar, as this is not a standard way: any reason you can’t leave the menu bar also on the app class?).
So, where do you handle your menu items? In the window, in the app, somewhere else?
Yep, I handle my menu items in my Window.
I did leave the menu bar in the App but still has the same issue.
Have you double-checked the menu item handlers are exactly named like your menu items?
Are your menu items’ AutoEnable property still on?
Otherwise, would it be possible for you to share a small project with this issue so I can examine it?