[squeak-dev] Re: EventSensor questions

Igor Stasenko siguctua at gmail.com
Thu Feb 12 21:11:10 UTC 2009


2009/2/12 Michael van der Gulik <mikevdg at gmail.com>:
>
>
> 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?
>
yes, events are queued in VM buffers, and waiting until they will be
polled by event sensor.

> Does this behaviour differ between platforms? Are there any platforms where
> this could be a problem?
>
since i dealt mostly with win32 VM, i can assure you that it using own
event queue.
I can't see how other VM's can avoid that. Otherwise same image on
different platforms would behave very different.

> Gulik.
>
> --
> http://people.squeakfoundation.org/person/mikevdg
> http://gulik.pbwiki.com/
>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list