Re: System contextual menus
Re: System contextual menus
- Subject: Re: System contextual menus
- From: Rainer Brockerhoff <email@hidden>
- Date: Wed, 30 Jan 2002 19:34:02 -0200
At 16:33 +0100 30/01/2002, Ondra Cada wrote:
>
Rainer,
>
>
>>>>>> Rainer Brockerhoff (RB) wrote at Wed, 30 Jan 2002 12:56:03 -0200:
>
RB> by the apparent omission of a Cocoa way to get the system-wide contextual
>
RB> menu
>
>
to get what??? Either I don't understand, or there is no such a beast. The
>
contextual menus are always a property of the view the mouse happens to be
>
over...
<Warning Ondra : repulsive Carbon stuff discussed>
In Classic times, the contextual menu was always system-wide (using modules installed in the System Folder's "Contextual Menu Items" folder). The Menu Manager calls for contextual menus allow you to specify the context of whatever has been clicked in your window in a AERecord, and to pass a list of your contextual items. The system would then poll the various system-wide modules, and each one that claimed to handle your context would insert menu items in the menu. Your own items would come last.
In Mac OS X, this still works for Carbon apps. The Finder, Sherlock, and other Carbon applications get the benefit of contextual menu plugins installed in the various "Contextual Menu Items" folders.
<plug> For instance, my famous "Zingg!" contextual menu plugin works in the Finder, in Sherlock, and in various other Carbon file browsers like Graphic Converter, but not in Cocoa file browser like SNAX.</plug>
Only Cocoa apps apparently have no standard way of taking advantage of system-wide plugins...
...that said, in the old days there was no way of _avoiding_ those plugins, unless you redid the whole popup menu stuff from scratch by yourself.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"I love deadlines. I love the whooshing noise they make as they go by" (Douglas Adams)
http://www.brockerhoff.net/ (updated Jan. 2002)