Is it possible to add contextual menus to the app icon on the Mac Dock? I know other development systems have this capability.
I would like to add a “Quit” menu to the Icon. I have disabled Quit in the application because it sometimes exits for no apparent reason. This is a reminder type app and should always be running. But I have to KILL it to reboot computer.
The Quit menu on the icon on the dock does not function when Quit is disabled in the app. I need a generic dock icon menu item called “Quit Now” or some other name. When clicked the handler will terminate the app.
Today I spend a lot of time working on a NSApplicationDelegateMBS class. This class gives you more than 20 application related events including a dockmenu event. There you can build your menu to be displayed in the dock. The event fires everytime the menu is about to be shown, so you can add menu items there dynamically.
As you see we can have all the typical menu features like separators, checkmarks or submenus.
This will be available with 11.2pr5 plugins later tonight (or tomorrow). For Carbon applications, you can use our existing CarbonApplicationEventsMBS class.