Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!dlyons From: dlyons@Apple.COM (David Lyons) Newsgroups: comp.sys.apple Subject: Re: IIGS programming question Message-ID: <32581@apple.Apple.COM> Date: 21 Jun 89 20:17:18 GMT References: <9607@boulder.Colorado.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 25 In article <9607@boulder.Colorado.EDU> hartkopf@tramp.Colorado.EDU (HARTKOPF JEFFREY M) writes: >[...] when >the program gets back to the main event loop it interprets that mouse press >as part of the event queue and acts accordingly, which I don't want. What I >want it to do is use that mouse press to close the window, and then NOT add >it to the event queue. Is there some way to do this? Thanks a lot. You can't stop the mouseDown event from being added to the queue, but you can certainly *use* it from the queue--this is probably the most reasonable thing to do. I guess you're just calling Button(0) right now to check the button status. Instead, call GetNextEvent (with a pointer to some space to use as the event record) until it returns a mouseDown event. Using $ffff for the event mask is probably fine--if you mask out other events, they will be saved up & used later (you probably don't want keypresses that come along to be kept and used later, so just ask for all events & ignore the ones you don't want). --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 AppleLink--Personal Edition: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.