Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: driver windows (was notification manager) Message-ID: <31889@ucbvax.BERKELEY.EDU> Date: 13 Oct 89 09:50:12 GMT References: <2903@netcom.UUCP> Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 28 In article <2903@netcom.UUCP> allanh@netcom.UUCP (Allan N. Hessenflow) writes: >I need to display a dialog giving the user a choice between two actions >from within a driver. Note that a driver and a desk accesoory are essentially the same thing. If you set the needTime bit in the driver header, then the system will call the driver's Ctl entry point with an accRun message. At that point you can safely put up a window. Remeber to stuff the driver's refnum (a negative number) into the windowKind field of the window, so update, activate, mouseDown, and keyDown events will come to your driver's Ctl entrypoint with an accEvent message. Remember that if you want to use the dialog manager, you should set get the event, set the window type to dialogKind temporarily, call dialogSelect, then restore your windowKind. Don't bother setting the windowKind on an Alert, you can just call it. Though, watch what resource file is currently open! Note that when the user chooses close from the file menu, or clicks in the close box, your driver will receive a "close" message. There is a special error code reserved for you to return, so the caller will you know that you just closed that window, not the whole driver. --- According to the Constitution, the Constitution is unconstitutional: --- David Phillip Oster --U.S.Constitution I.10.1: "No State shall Arpa: oster@dewey.soe.berkeley.edu --enter into any treaty, alliance, or Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu -- confederation..."