Having fits with the menu bar

J. Landman Gay jacque at hyperactivesw.com
Sat Mar 12 14:43:56 EST 2011


On 3/12/11 12:25 PM, James Hurley wrote:
>
> But there are still some issues. In the OSX menu I now see 4 menus
> only 3 of which are of my doing. They are:
>
> LiveCode File Edit Help

Those are standard OS X conventions. The first menu item is supplied by 
the OS and is always the name of the frontmost app. Even if you have no 
menubar at all, you will have that menu item, as the OS needs it to 
provide the Quit item -- which is always in the app menu. You don't need 
to do anything about it; when you build a standalone, "Livecode" will 
change to the name of your standalone. The menu is created by the OS, 
not by LiveCode, and can't be removed.

>
> Under the LiveCode menu I now have Preferences and About, among other
> things. I had no Preferences item in my menu group. I did have an
> About item and it has been moved to this LiveCode menu. As has the
> Quit item that I had under the File menu.

Standard behavior. A preferences item under the app menu is put there by 
the OS. There are funky ways to disable it, but its presence is standard 
and expected by all Mac users. Your Edit menu should always have 
Preferences as its last item entry, which LiveCode will move to the 
appropriate place on OS X, under the app menu. The About item also goes 
there, is always the first item under the app menu, and is standard 
layout for OS X. I don't think you can actually remove that one either.

>
> And I now find a "Search" window item under the "Help" menu. Where
> did that come from?

That is Spotlight, a system service, put there by the OS and not 
removable. It is under the Help menu in every app, system-wide.

>
> So.... Is there a way to get rid of the "LiveCode" menu and put those
> items Quit and About) back where I had placed them?

No, and you shouldn't, because they are in the places they are supposed 
to be for OS X. Moving them will confuse your Mac users, your app will 
be non-standard and (knowing most Mac people) distained for flying in 
the face of the HIG. The beauty of LiveCode is that it manages all this 
menu placement for you. Your items will be where you put them on Windows 
and Linux, which have different menu expectations, and transparently 
moved to the required locations on OS X.

Since you're on a Mac, look at the menu bars in every app on the 
machine, including the Finder, and you will see that all menu items and 
placement always follow these conventions. On Mac, apps are required to 
have an application menu (placed there by the OS) which is always 
partially populated by OS services and features, and contains the Quit 
menu item. After that you must have a File menu, followed by an Edit 
menu, in that order. After that you can have any app-specific menus you 
need. The last menu item must be Help, which the system also partially 
populates.

>
> But I am grateful now just to be making progress. I assume that
> RunRev was trying to be helpful in creating the menu for the
> standalone, but their plans were not quite my plans.

Mac users went to some lengths to get MetaCard to provide this default 
behavior way back when OS X first came out. The menus conventions are 
strictly enforced by the OS, and they behave correctly in LiveCode. Go 
with the flow, Mac users will appreciate it.

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




More information about the use-livecode mailing list