Polling

Bob Arning arning at charm.net
Mon Feb 28 03:41:44 UTC 2000


On Sun, 27 Feb 2000 22:16:21 -0500 "Charles-A. Rovira" <crovira at wt.net> wrote:
>Want to run that one by me again?
>
>You surely don't have a loop polling the mouse to see what happened...
>
>Most GUIs generate separate events for mouse down and mouse up so you can bring the
>mouse down over a widget and not trigger by moving the mouse off and then releasing
>it so something else get the mouse up. They also generate mouse mode and get lose
>focus events...

Charles-A.,

There are actually levels within levels here, some polling and some events:

1. How the underlying OS communicates with the VM varies platrorm by platform.
2. How the VM communicates with the image is (in the case of Morphic) a polling loop (see PasteUpMorph>>doOneCycleNow and HandMorph>>processEvents).
3. How the HandMorph communicates those events to the appropriate morph - see various implementators of #mouseDown: and #mouseUp:, e.g.

Cheers,
Bob





More information about the Squeak-dev mailing list