[BUG][FIX] YellowButtonBit and BlueButtonBit are swapped

Hannes Hirzel hirzel at spw.unizh.ch
Wed Mar 6 11:35:19 UTC 2002


On Wed, 6 Mar 2002, Andreas Raab wrote:

> > > A subclass of Rectangle
> > > 
> > > red    click -> background color switches to red
> > > yellow click ->                              yellow
> > > blue   click ->                              blue    
> > > 
> > > Implementing this would actually be a nice exercise for a 
> > > new squeaker. (An old Squeaker like Bob Arning and Ned Konz would
> > > probably need 15 minutes, while a newbie would probably need an
> afternoon).
> > > It would as well make a good topic for writing a tutorial.
> > 
> > Cute.  (It actually only takes a minute or two -- just implement
> > mouseDown:, handlesMouseDown:, and blueButtonDown: .)
> 
> A minute? Hm ... how long does it take to type:
> 
> 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.
> 
> ;-)
> 
> Cheers,
>   - Andreas
> 

Cute! I put this under 'Squeak Bon Mots'
http://minnow.cc.gatech.edu/squeak/268

And as well under 'FAQ: Mouse Buttons'
http://minnow.cc.gatech.edu/squeak/897


Remark: On my two-button Windows laptop an ALT-left-click directly gives
the halos instead of changing to blue even after filing in Bert
Freudenberg's fix of today.


Cheers
Hannes Hirzel




More information about the Squeak-dev mailing list