Getting use of menus straight

Peter Haworth pete at lcsql.com
Sat Mar 14 16:16:18 EDT 2015


I seem to remember you have to put your mouse handlers in the menubar group
not the menu buttons?  There used to be a problem with that because you
couldn't tell which menu button had been clicked, or perhaps that was just
on OSX.  It's been a while since I used menubars though so it may have
changed.

On Sat, Mar 14, 2015 at 11:34 AM J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> 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
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list