Path: utzoo!mnetor!uunet!cbmvax!rutgers!ucla-cs!zen!ucbvax!hoser.berkeley.edu!bryce From: bryce@hoser.berkeley.edu (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: Re: Dealing with lots of messages (WARNING!!! Intution bug!!) Message-ID: <22456@ucbvax.BERKELEY.EDU> Date: 8 Jan 88 15:23:01 GMT References: <4346@garfield.UUCP> <3094@cbmvax.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: bryce@hoser.berkeley.edu UUCP (Bryce Nesbitt) Organization: The Lucite Foundation Lines: 58 Keywords: messages IDCMP MOUSEMOVE, intuition bug Summary: WARNING!!! WARNING!!! DANGER!!! BUG CITY!!! DANGER!!! In article <3094@cbmvax.UUCP> steveb@cbmvax.UUCP (Steve Beats) writes: > >Actually, I have found that the best way to handle MOUSEMOVE events is to use >the ReportMouse( window, BOOLEAN) function. WARNING!!! WARNING!!! DANGER!!! BUG CITY!!! DANGER!!! (Dramatic enough?) ReportMouse() is 100% defective. Totally useless. It can *NEVER* be called safely by user code. No, I'm not talking about the bug that swaps the order of the parameters depending on compiler/ options. I'm talking about something more fundamental: 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). WARNING!!! WARNING!!! DANGER!!! BUG CITY!!! DANGER!!! The solution is jimm's new flag. But we'll need to wait two Kickstart releases for that. (What's the bit number?) >My 'C' is really rusty, I've spent the last year writing in assembler so don't >try to compile this :-) (Anyone want an assembler example ?) Sure. But I'll take my example in the fast-filesystem flavor. :-) |\ /| . Ack! (NAK, SOH, EOT) {o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce (or try "cogsci") (") U "Your theory is crazy... but not crazy enought to be true." -Niels Bohr |\ /| . Ack! (NAK, SOH, EOT) {o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce (or try "cogsci") (") U "Your theory is crazy... but not crazy enought to be true." -Niels Bohr