Button tracking Morph

Bert Freudenberg bert at freudenbergs.de
Thu May 24 14:37:44 UTC 2007


On May 24, 2007, at 16:34 , subbukk wrote:

> Hi,
>
> Is there a way to get notified (not polling) when any mouse button/ 
> modifier
> key goes up/down?
>
> I was trying to put together a Morph (like the Mouse button  
> indicator in the
> Orange Book) that tracks up/down status of mouse buttons and  
> modifier keys in
> real time. I got stuck because all existing usage of Sensor is  
> based on
> polling while I would rather get notified on changes.

You should never use Sensor in Morphic, this is from MVC days.

Use Morphic events: http://wiki.squeak.org/squeak/2477

- Bert -





More information about the Squeak-dev mailing list