OSX Menu Mystery

Richard Gaskin ambassador at fourthworld.com
Wed Mar 9 18:00:16 EST 2005


graham samuel wrote:
> I'm aware of the way in which OSX hijacks the 'Quit' item from a File 
> menu (I guess this is the last item in my leftmost menu rather than 
> something called 'Quit', strictly speaking) and puts it in the menu 
> which has the name of the app (Revolution in the IDE, or whatever your 
> app is called in a standalone - let's call this 'the application menu'). 
> I also think (is this an urban myth?) that maybe in OSX the 'about' and 
> 'help' menus work in a particular way dictated by the OS rather than the 
> developer.
...
> I guess there is an explanation in the docs but I just can't find it. 
> There is an item under 'quit' which explains what OSX does when you 
> choose 'Quit', but this doesn't handle the 'preferences', 'about' or 
> 'help' cases at all. Maybe I'm just trying to make things too complicated.

Howdy Graham -

Still loving your new digs in Toulouse?

Here's the deal:

In Mac Classic, Windows, and most Linux window managers the 
"Preferences..." item is the last item in the Edit menu by convention, 
while OS X uniquely places this under the application menu.

For the convenience of the developer, if you make your menus 
HIG-compliant for 98& of the world by putting an item named 
"Preferences..." as the last item in your Edit menu under a divider, 
when running in OS X the divider is removed and the item is 
automagically moved to the application menu.

The "About..." item works similarly:  96% of the world places this as 
the last item in the Help menu, but Mac Classic puts it under the apple 
menu and OS X puts it under the application menu.  As with 
"Preferences...", making the last two items of your Help menu a divider 
followed by "About..." will take care of most platforms and the engine 
will automagically move them to the appropriate places for Classic and OS X.

"Quit" works pretty much the same too:  if you make the last two items 
of your File menu a divider followed by "Quit", the engine will move the 
item to the application menu for you in OS X.

It may seem odd at first, but having spent many hours in meetings with 
the SuperCard team many years ago when they were still planning a 
Windows version, I must say that Scott Raney's solution -- once grokked 
-- is a wonder of simplicity and automation for HIG-compliant apps.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev


More information about the use-livecode mailing list