[squeak-dev] EventSensor questions

Igor Stasenko siguctua at gmail.com
Thu Feb 12 09:13:36 UTC 2009


2009/2/12 Michael van der Gulik <mikevdg at gmail.com>:
> Hello list.
>
> I've been looking at discarding Morphic and writing an application to use
> Display and EventSensor directly. I have some questions.
>
> I'm seeing an inputSemaphore in the EventSensor class, but it doesn't appear
> to be used. Is it used anywhere? Considering that it doesn't appear to be
> used, how stable is the VM side of this code?
>
> How many platforms support this inputSemaphore? Does it work on Windows,
> Mac and Linux?
>
> Also, am I seeing this right: Morphic polls Sensor? The loop is in
> Project>>spawnNewProcess, which eventually calls HandMorph>>processEvents
> which reads from Sensor.
>
> 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?
>

The inputSemaphore is not signaled by VM (win32), but instead used to
check how image polls its events.

Btw, there is a refactoring of this stuff in Pharo, not sure if it
already incorporated in image. It was wtitten with idea kept in mind,
that there can be multiple event listeners at once, not just hand
morph.

> Thanks,
> 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