levin@bbn.com (Joel B Levin) (11/17/88)
Ever since seeing a suggestion in these groups for a DA which spoke some text via MacinTalk (something which I surmise has been done already) I thought I might try something like this for practice; so I wrote an FKEY which would speak the Scrap, obtaining this text in much the same way as the Clipper FKEY does. This fails to work correctly under MultiFinder (in several applications -- I didn't test very hard) because after a Copy, the Scrap doesn't get set by these applications until you change layers (or perhaps windows), so to use it you would have to Copy, switch out of your application, hit the FKEY, switch back. I think this happens with Clipper; at the time I found it useful, I was using 'Uni'Finder. This makes me wonder if there is a way to do this right with an FKEY. I gave up. To get around this, I changed it into a DA, since all applications do the right thing with the Scrap when a DA is activated (or in MF when you switch to the DA Handler). But now I have another question -- more generally about quitting DAs properly. If I want my DA to do everything when it opens, and then go away (no globals, no control or close routine), how do I do it? The answer I found was to return an error value from DRVROpen (I chose openErr) even after successful conclusion. Is this right? Related question (I think): If in some DA the control routine wants to make the DA go away, how do I do that? I know that if there is a window and the user closes it, my close routine will get called; is this also automatic if I close the window myself from the control routine? What if I don't have a window? Thanks / JBL UUCP: {backbone}!bbn!levin POTS: (617) 873-3463 INTERNET: levin@bbn.com