Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!unmvax!ncar!boulder!tramp!ewing From: ewing@tramp.Colorado.EDU (EWING DAVID JAMES) Newsgroups: comp.sys.mac.programmer Subject: Re: Menus in DA's Keywords: Menu DA brain-dead Message-ID: <13848@boulder.Colorado.EDU> Date: 14 Nov 89 06:46:05 GMT References: <410@torch.co.uk> <32497@ucbvax.BERKELEY.EDU> Sender: news@boulder.Colorado.EDU Reply-To: ewing@tramp.Colorado.EDU (EWING DAVID JAMES) Organization: University of Colorado, Boulder Lines: 20 Summary: Expires: Sender: Followup-To: Distribution: In article <32497@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >Key eqivalents for menu commands in desk accessories have traditionally >been hard coded into the d.a. The text in the menus is actually ignored. Gee, that's not what I do. Instead I simply call MenuKey() inside my DA when I get a key hit. MenuKey() will return 0 if the key equivalent was in a DA's menu, and it calls your DA again with an accMenu control call (can you say reentrant DA?). If your DA has a heirarchical menu, MenuKey() will return the ID for command key equivalents in the h-menu, and you should handle things according to this return value. (BTW, 32-bit QD has a bug that doesn't allow selecting heir-menus in a DA using the mouse. But, this trick still works for handling command key equivalents.) Also, Mac tech support said they thought that this was an "interesting solution" to command key equivalents in a DA - they had no problems with it. Dave Ewing ewing@tramp.colorado.edu (128.138.238.33) ..!hplabs!boulder!onecom!tyvax!iftech!dave (My Mac IIx running uupc & MacOS!) AppleLink: D2408 (D2408@applelink.apple.com)