"Default" Menu in Mac OS X Standalone

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alasdair23
Posts: 12
Joined: Wed Nov 28, 2007 10:58 am
Contact:

"Default" Menu in Mac OS X Standalone

Post by alasdair23 »

When running a standalone, there is a "default" menu [sits to the right of the Apple Menu] called the same as the Stack name. It contains a number of menu items including "About" and "Quit".

How does one trap user selection of the "About" and "Quit" items? The standard "MenuPick" doesn't seem to have any effect. The ONLY menu items my Mac app needs are "About" and "Quit" so it's great that these are generated automagically, but not so great that I cannot access them :-)
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "Default" Menu in Mac OS X Standalone

Post by Klaus »

Hi alasdair23,

you cannot control these "default" menu items!

OK, you could catch the "quit" AppleEvent that is sent when the user selects "Quit".
But in general you need to create you own (even same!) menu items to be able to control them.


Best

Klaus
alasdair23
Posts: 12
Joined: Wed Nov 28, 2007 10:58 am
Contact:

Re: "Default" Menu in Mac OS X Standalone

Post by alasdair23 »

Hey Klaus

Thanks for the feedback. So what I ended up doing was creating a single menu and installing that. This magically allowed the MenuPick event handler to trap "About" being selected from the "default" menu. Only problem with this fix is it requires a menu to be installed that I don't really need ... but at least this is a reasonable solution for now.

Just to add this forum has *always* been useful, thanks to everyone here.
Post Reply