the menuBar and the EditMenus
livfoss at mac.com
Fri Apr 11 00:50:37 CEST 2014
I'm still having a strange time with these two entities in a desktop Mac app which is also designed to work on PCs. All I'm trying to do is to have a Mac menu at the top of the screen, i.e. in the normal place for Macs, but NOT to have the stack size altered compared to the PC version, where the menu bar will be at the top of the window. This doesn't seem to work for me, certainly not in the IDE. If I want my menu active in the Mac version, it seems I must set the editMenus to false, which triggers the engine to change the size of my stack (it takes 30 pixels off the height).
What I want to do is to set a group to be a menu bar (set the menuBar of this stack to "myMenuGroup"), but also place it at the top of the window where the PC version will use it, and then simply hide the PC version of the menu if I'm not running on a PC. I do not want the stack size to change. However, within the Mac IDE, unless I set the editmenus to false, the IDE will not display my menu but will just continue showing its own one. I don't think this used to happen, but I can show it happening now. This augurs badly for the eventual standalone.
Is anyone else trying to develop a cross-platform (Windows and Mac) app where the window (stack) size stays the same on both platforms? FWIW I'm using LC 6.6.1 Commercial on Mavericks 10.9.2 - though the problem seems to have existed for some time.
I guess I did something wrong, but I now have a very simple test stack that shows the above behaviour, so unless there is a trick, I may have to code my way out of the problem by forcing the stack size to change back after editMenus is set.
Has anyone got a better solution?
More information about the use-livecode