InputSensor still polling?

C. Gable Watts CarlGWatts at AppliedThought.com
Fri Apr 28 06:08:49 UTC 2000


Dan,

I was going to make a comment about 'polling' to find out when the Display is resized.  I was going to recommend instead a new input event from the VM come into InputSensor instead.  So much more tidy...

I just assumed that InputSensor had been converted by now to get events from the VM (as we had done at Interval in our Squeak-based project there).

But when I looked at class InputSensor, I found to my amazement its still polling based (with all the problems of missed events and wasted cycles that implies).

Admitedly I don't follow the discussion on this squeak list as often as I'd like.  Is there some reason why InputState has never been converted to reaping 'events' from the VM rather than polling?  Or is it just that no-one doing Squeak development has gotten around to it yet?  Perhaps it remains polling in an attempt to avoid requiring the VM to poll on some platforms?  No, that couldn't be it, the VM already polls for the interrupt key on some platforms.

Would it help to post the version of class InputSensor I wrote for Interval's event-driven version of Squeak?  It might help some though much of the difficult work was in the two new primitives it used.  Implementing those new primitives on all of Squeak's different platforms would be a chore & a half.  Perhaps the platform spread has gotten too wide to expect the new primitives it requires to be implemented on all platforms?

Carl Watts


>It's so easy (was it Lex who suggested this?).  Define...
>
>... and insert the line
>	DisplayScreen checkForNewScreenSize.
>right before the delays in
>	PasteUpMorph>>interCyclePause: (for Morphic)
>and
>	Controller>>interActivityPause (for MVC)





More information about the Squeak-dev mailing list