Getting use of menus straight

J. Landman Gay jacque at hyperactivesw.com
Sat Mar 14 14:34:26 EDT 2015


On 3/14/2015 12:02 PM, Dr. Hawkins wrote:
> Before I blow off another limb, I need to see if I have this straight.

Advice I received early on is that if your stack will have menus, 
develop for Windows first (even if you're on a Mac.) It's good advice. 
It allows you to see how the layout should accomodate the menu bar and 
gives you a visual representation so you know which cards you forgot to 
give menus to.

Windows/Linux: Requires a menu group on each card that uses menus. 
Create a background group and place it on all relevant cards. You do 
need to set the menubar of the stack to that group if you want Windows 
keyboard shortcuts to work.

Mac: The same setup applies, place the menu group on every card. You 
don't need to do anything else for a Mac if you've already done the above.

Setting a group as the stack menubar changes the group behavior; it will 
force the autoscroll on a Mac, and respond to Cmd/Ctrl key presses as 
both Windows and Mac users expect.

DefaultMenuBar: Only applies to Macs because there is always a system 
menu bar. It's okay on Windows not to have a menu inside a window, but 
you can't have a "no menu window" on a Mac. If you don't assign a 
default menu bar, you'll get a bare naked system menu with the Apple and 
Help default items in it and nothing else. If your app never has any 
windows without their own menu bars, then you don't need a default one. 
But if you have custom dialogs or other windows without any menu bar 
assigned, then that's what the default menu bar is for.

Revising menus: It's much easier on Mac-only apps because you can set a 
menu group in another stack to be the system menu and it can be shared 
all across all stacks, so you only need to update one group. But you 
can't do that on Windows, so you do need to update all copies of the 
group. Yes it's a pain, but you can automate it somewhat with a script. 
The example you gave should work.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list