Xplat MenuItems

How does one best deal with menu items such as
Preferences (Options)
About
etc.

Under OSX I wish to have under the “Applicaton” Menu

  • About
  • Preferences
  • Check for Updates
  • Purchase

But under Windows
About should be under HELP
Preferences should be labeled OPTIONS under EDIT

If in the IDE I put about under the HELP (as an APPLEMENUITEM), and Preferences under EDIT as a PREFSMENU ITEM
then in Windows it seems to be fine… but under OSX I get

  • Check for Updates
  • About
  • Preferences
  • Purchase

Can I control the order under OSX somehow?
or do I have to create DUPLICATE menu entries, and make one set visible and the other not visible based on TARGETOS?

well you can’t make preferences show up in a spot it’s not supposed to
it has a “well defined spot”
so that may not be possible to move

the rest should be in the order encountered by going through each menu from left to right and then through each of the members of the menu

Where is “Check for updates” located in the menu bar ? “Purchase” ? And “About” ?

[h]About Menu[/h]
Create a Help top level menu item under that create an About MyApp menu item whose super is AppleMenuItem, job done, on windows you have Help >> AboutMyApp under Mac you have AppleMenu >> About MyApp.

[h]Preferences Menu[/h]
Create an App constant called kToolsOptions in the constant options have Platform OSX Value Preferences and on the next line have platform Windows value Options.
Create a Tools top level menu item under that create an Options menu item whose super is PrefsMenuItem and in the inspector its text is #App.kToolsOptions, job done, on windows you have Tools >> Options under Mac you have AppleMenu >> Preferences.

[h]Purchase Menu[/h]
Under your Help top level menu item created above create an Purchase menu item whose super is AppleMenuItem, job done, on windows you have Help >> Purchase under Mac you have AppleMenu >> Purchase.

You get the gist… Hope that is what you were after

I went the simple route…

created duplicate menu items (only needed two)… put them in the correct “physical locations” and added this code

  //
  // OS Specific Menu Items
  //
  #If TargetMacOS Then
    menu_ABOUT.visible=flag
    menu_PREF.visible=flag
    menu_WIN_ABOUT.Visible=False
    menu_WIN_OPTIONS.Visible=False
    WinSep1.Visible=False
    winsep2.Visible=False
  #Else
    menu_ABOUT.visible=False
    menu_PREF.visible=False
    menu_WIN_ABOUT.Visible=flag
    menu_WIN_OPTIONS.Visible=flag
    WinSep1.Visible=True
    winsep2.Visible=True
  #EndIf