Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr From: leonardr@uxe.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: A suicidal desk accessory Message-ID: <226000016@uxe.cso.uiuc.edu> Date: 31 May 88 19:19:00 GMT References: <326@uva.UUCP> Lines: 29 Nf-ID: #R:uva.UUCP:326:uxe.cso.uiuc.edu:226000016:000:1627 Nf-From: uxe.cso.uiuc.edu!leonardr May 31 14:19:00 1988 freek@uva.UUCP(Freek Wiedijk) writes in comp.sys.mac.programmer >What is the proper way for my desk accessory to commit suicide, i.e. to close >itself and vanish without leaving a trace? >(i) To call my own Close routine won't help much, because the system won't > know I'm doing it, and the DA will stay active. >(ii) However if I call CloseDeskAcc from within the DA code, that code won't > be there to return to, after CloseDeskAcc is finished (or will it?). > >Is it possible that I am mistaken, and that the only way to terminate a DA is >by closing it with the close box of its window, or with Close from the File >menu (in both cases CloseDeskAcc will be called from outside the DA)? > Well, I don't know if it is the _CORRECT_ answer or not, but SigmaEdit (DA) uses a CloseDeskAcc on itself when it gets a Cmd-Q ( Not menu item, yet ) and things work just fine. Hope that helps... +---------------------------------+-----------------------------------+ + + Any thing I say may be taken as + + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + AppleLink:D0025 + + Delphi: MACgician + + + + + +---------------------------------+-----------------------------------+