Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!tramp!ewing From: ewing@tramp.Colorado.EDU (EWING DAVID JAMES) Newsgroups: comp.sys.mac.programmer Subject: Re: Implementing a Talking Menu Message-ID: <7826@boulder.Colorado.EDU> Date: 31 Mar 89 19:16:20 GMT References: <3937@bgsuvax.UUCP> Sender: news@boulder.Colorado.EDU Reply-To: ewing@tramp.Colorado.EDU (EWING DAVID JAMES) Organization: University of Colorado, Boulder Lines: 23 Walt, in your article you say: >"We are working on a desk accessory that will speak the menu choice on a >mouse event. I would like to know how to get the English text of the menu >and the menu choice (whichever the cursor was over) on mouseDOWN. Getting the text for a menu item is as simple as calling GetItem(). It looks like you have to get a menu's title directly from the MenuInfo record (yuck). See Inside Mac vol I chapter 11. If you actually want to speek the menu item that the mouse is over as it's being tracked through the choices, I'd say you actually have to write an MDEF for this (even yuckier). >"Secondly, my DA does not have a window. Thus I would like to close the DA >with the appropriate choice from the menu the DA creates. I've tried to call >my Close(Device) routine, when that menu item was chosen, but that did not >work. What will work?" You need to call CloseDeskAcc() from your quit routine. (Your close() routine will be called indirectly from this). See Inside Mac vol I, chapt. 14. -dave-