More menu fun - I’ve narrowed my cross platform menus down to a single menu using dynamic constants and the “QuitMenuItem”, “ApplicationMenuItem”, and “PrefsMenuItem” Super assignments. However, I can’t determine how to force the order of the items that get moved to the ApplicationsMenu on macOS. The issue is that my “Enter License” and “Preferences” entries are appearing above the “About …” menuitem.
The About… menuitem is in the Help menu as the first item while the Preferences and License menuitems are in the File menu along with the Quit menuitem.
Is there some mechanism to force the order in the Applications menu in this situation?
I guess Xojo (or the OS) iterates through all menus, from left to right, and just moves what it finds as ApplicationMenuItem to the Application menu, in the order it finds them.
I think Xojo lacks functions for that. A ugly solution would be, in the app’s Open event (or where appropriate) to remove the items you know are already in the Application menu and add them back in the order you want them (I don’t remember if you can access the Application menu directly, but I’d guess you can add them to their original menu and they’d get relocated in the Application menu in the order you re-add them).
Just a guess.
A feature request to be able to handle menu items in the Application menu better would be great.
I’m not really familiar with how this part of the Mac framework builds out those menus. I recommend you create a Feedback case with a sample project so that we can look into seeing how the order is determined.
I’m happy with my configuration for ARGen and Lifeboat. From left to right in the menus in order:
Edit > Preferences / Options : PrefsMenuItem
Help > About : ApplicationMenuItem
Help > PrefsSeparator (-) : ApplicationMenuItem
Help > Check For Updates : ApplicationMenuItem
Help > License : MenuItem
It ends up leaving License in the Help menu on Mac, but everything else seems to fit well. Honestly it was just a lot of experimentation. I can’t really suggest anything better than play with it until you like it, sorry