the menuBar and the EditMenus

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Apr 11 06:32:21 EDT 2014


Hi Graham,

Instead of setting the editMenus to false, you can also set the 
defaultMenubar to the name of the group that you want to use as a menu 
and then set the visible of the group to false. This way, the stack size 
doesn't change.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 4/11/2014 00:50, Graham Samuel wrote:
> 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?
>
> TIA
>
> Graham
>





More information about the use-livecode mailing list