[BUG][FIX] YellowButtonBit and BlueButtonBit are swapped (forgot
postscript)
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Wed Mar 6 10:52:50 UTC 2002
[Resend: I forgot to install the new constants]
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
5. Install new EventSensor constants
The changeset for 2.-5. is attached.
-- Bert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buttonFix-bf.2.cs.gz
Type: application/x-gzip
Size: 2274 bytes
Desc:
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020306/66d4a103/buttonFix-bf.2.cs.bin
More information about the Squeak-dev
mailing list
|