menu items for Osx and Linux

Im designing my software on Windows and I want to build also for Osx and Linux.
I noticed that for Osx , the menuitems dont work as if they didnt have any code; but for Windows everything is fine.

So now Im wondering if there’s something I should be aware of when creating menus for the other Osystems ?

what do you mean with “didn’t have any code”?

“as if”, like nothing happens when you click on them.

I saw this issue come up in your other thread.
Without the code from your project we really don’t have any way to help you.

Also, before you pour tons of time into a Mac version you should know Text to Speech is built into OSX already, and can be used from any app that handles text.

This is a link to the binary project, as you ca see it’s very simple and small.
The problem seem to be the menu items not working on OXS and Linux (but they work on Windows!)

https://www.dropbox.com/s/szw3wc470ba4xfm/parlonow.xojo_binary_project

Thanks

[quote=121179:@Horacio Vilches]The problem seem to be the menu items not working on OXS and Linux (but they work on Windows!)

https://www.dropbox.com/s/szw3wc470ba4xfm/parlonow.xojo_binary_project [/quote]

You are not using menus as they should be used under OS X. On a Mac, you click a menu and select an option inside. For some reason, Windows enabled you to assign menu handlers to menu heads, but that does not work in OSX. Probably because it does not conform to Apple Human Interface Guidelines https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/

If you do not comply to Apple Human Interface Guidelines, your app will most probably be rejected from the Mac App Store.

One way would be to use a ToolBar where buttons replace the menus you have now. So you would click on each item in the toolbar the way you do now on menu heads. The other advantage in terms of user interface is that you could enable the standard File and Edit menus, so the user could load and save text, as well as edit the content of the green text box with the standard Edit menu.

The other way would be to subclass MenuItem to use the EnableMenu event of the menu heads when the user clicks on them. Unfortunately I am not familiar with that technique and will not be able to assist. Plus the non standard usage of menus will get you kicked out of the MAS.

What about Linux ?

Most probably the same problem. Not done. You are using menus as buttons, which is completely unusual, even under Windows. I cannot recall any Windows application working the way you have set up your program.

I have already fixed his project file for him, and also advised him to always use sub-menus, and use the code below to cater for other platforms :slight_smile:

#ElseIf TargetMacOS // ---------------------------------------- Insert OS X-specific code here

Yes, I see now : https://forum.xojo.com/14809-where-to-find-testers
:slight_smile: