Path: utzoo!utgpu!water!watmath!clyde!rutgers!cbmvax!steveb From: steveb@cbmvax.UUCP (Steve Beats) Newsgroups: comp.sys.amiga Subject: Re: Dealing with lots of messages (WARNING!!! Intution bug!!) Keywords: messages IDCMP MOUSEMOVE, intuition bug Message-ID: <3112@cbmvax.UUCP> Date: 8 Jan 88 18:20:50 GMT References: <4346@garfield.UUCP> <3094@cbmvax.UUCP> <22456@ucbvax.BERKELEY.EDU> Reply-To: steveb@cbmvax.UUCP (Steve Beats) Organization: Commodore Technology, West Chester, PA Lines: 32 In article <22456@ucbvax.BERKELEY.EDU> bryce@hoser.berkeley.edu UUCP (Bryce Nesbitt) writes: > >WARNING!!! WARNING!!! DANGER!!! BUG CITY!!! DANGER!!! > >When a gadget is pressed it records the state of the REPORTMOUSE flag. >When the gadget is relased it restores that flag. > >Your program does this: > >> ReportMouse( w, FALSE ); >> DoNeatStuff( msg ); >> ReportMouse( w, TRUE); > >Think what happens if a person presses a gadget after the first ReportMouse() >and releases it after the second ReportMouse(). > >1> The gadget reads in "REPORTMOUSE OFF" >2> The program sets "REPORTMOUSE ON" >3> The release of the gadget sets "REPORTMOUSE OFF" > >You program is screwed. One of the gadgets that does this to you is >the standard page forward gadget. I have a test program that demonstrates >this clearly (the darn bug bit me HARD). > OK, red face time. Of course your dead right Bryce, but I would like to qualify my statement a bit. I guess I made the mistake of not specifying that this only works for things that are activated by a left mouse click. I've used it for file requesters (where FOLLOWMOUSE is set on the scroll gadget) and for drawing type things (where you must click the left mouse button before anything happens) and had no problems at all. Steve