[BUG][FIX] YellowButtonBit and BlueButtonBit are swapped (with image changes)

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Wed Mar 6 10:06:07 UTC 2002


On Wed, 6 Mar 2002, Andreas Raab wrote:

> m := Morph new.
> m on: #mouseDown send: #value: to:[:evt|
> 	evt redButtonPressed ifTrue:[m color: Color red].
> 	evt yellowButtonPressed ifTrue:[m color: Color yellow].
> 	evt blueButtonPressed ifTrue:[m color: Color blue].
> ].
> m openInWorld.

Bug report I: 
	That guy does not turn blue at all ;-)

Bug report II: 
	That guy does turn yellow when I press the blue button on 
	unix (using latest SF changes which are actually *right*). 
	Cause: MouseEvent>>yellowButtonPressed looks for mouse button 
	bit 2, but EventSensor class>>initializeEventSensorConstants
	defines YellowButtonBit to 1!

FIX:
	1. apply Lex's fix to sq.h
		#define BlueButtonBit 1
		#define YellowButtonBit 2
	   (if you're using the SF sources, just update)

	2. fix EventSensor class>>initializeEventSensorConstants
		(BlueButtonBit 1)
		(YellowButtonBit 2)

	3. fix EventSensor class comment

	4. fix all places to use the EventSensor constants

The changeset for 2.-4. is attached.

-- Bert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buttonFix-bf.1.cs.gz
Type: application/x-gzip
Size: 2402 bytes
Desc: 
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020306/e6fbb1a3/buttonFix-bf.1.cs.bin


More information about the Squeak-dev mailing list