[squeak-dev] Re: EventSensor questions
Michael van der Gulik
mikevdg at gmail.com
Thu Feb 12 21:00:45 UTC 2009
On Thu, Feb 12, 2009 at 10:20 PM, Andreas Raab <andreas.raab at gmx.de> wrote:
> Michael van der Gulik wrote:
> Looking at the implementation of EventSensor and InputSensor, what is the
>> actual history there? In terms of primitives, EventSensor (the "new" class)
>> seems to be more consistent with chapter 29 of the blue book, while the
>> InputSensor (the "old" class) uses undocumented primitives. How did it end
>> up this way?
> InputSensor was first. It used state-based primitive (i.e.,
> primMouseButtons) and was used for a very long time. However, because of its
> design, it resulted in events being lost (for example, when a mouse down-up
> transition happens between two polls for input sensor state) so I added the
> event based primitives. I have never cared much for the blue book so if this
> is more consistent with chapter 29 it's purely by accident (or perhaps
> because that's the more sensible way of doing things ;-)
Another question: using the new event-based primitives, does the VM,
underlying window system or OS also queue events on the platform side? I.e.
if the EventSensor class doesn't pick up a new event fast enough and queue
it, will that event be lost?
Does this behaviour differ between platforms? Are there any platforms where
this could be a problem?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev