Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!apple.com!cep From: cep@apple.com (Christopher Pettus) Newsgroups: comp.sys.mac.programmer Subject: Re: Programming menus Message-ID: <2215@internal.Apple.COM> Date: 5 Jun 89 23:26:30 GMT References: <1378@marvin.Solbourne.COM> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 33 In article <1378@marvin.Solbourne.COM> dce@Solbourne.COM (David Elliott) writes: > The idea of putting the menu information in a resource seems > quite useful, but it also gives a false sense of configurability. > > I would think that each menu item would have a unique identifier > associated with it, and that the menu selection mechanism would return > that identifier. In fact, that is effectively what MacApp does as a post-pass in the compilation process; it breaks a MacApp defined resource of the cmnu (which contains both menu definitions and an integer identifier) into two resources, one for the menu manager and one for the MacApp internals. The integer identifier is what the MacApp objects then deal with. In fairness, the main use of menu resources in their current form is localization. > I don't understand why it is necessary to call MenuKey > to find out which menu item was requested. Why doesn't the > keyboard input mechanism handle this? It could, but this seems to be a six-of-one, half-a-dozen-of-another type decision; the call has to be made either way. The current scheme, as it happens, allows for command key equivalents which do things besides abbreviate menu selections. -- Christopher Pettus | "Ganesha Said: 'Done! The very Network Systems Development | day I was born I made my first Apple Computer, Inc. | mistake, and by that path have cep@apple.com {nsc, sun}!apple!cep | I sought wisdom ever since.'" AppleLink: PETTUS.C | - The Mahabharata (408) 974-0004 | I: A Mine of Jewels and Gems