[squeak-dev] Re: EventSensor questions

Andreas Raab andreas.raab at gmx.de
Sat Feb 14 18:50:45 UTC 2009


Igor Stasenko wrote:
> Btw, Andreas. Currently, most images polling events by themselves and
> never wait on input semaphore.
> 
> With new rewrite, there are 2 InputSensor classes with different
> #waitForInput method behavior:

Seriously? Even more InputSensor classes? (*rolling his eyes*)

> Now, if you will fix signaling the input semaphore, we need some way
> to determine what method of event polling is most appropriate -  to
> install a best event polling mechanism.
> Any ideas how this can be determined by image side?

Easy. Run the poller until the first event comes in. Check whether the 
semaphore is signaled. Switch to non-polling if so. Alternatively, use 
#waitTimeoutMSecs: - it means you're still occasionally polling but that 
is probably acceptable.

> And any other value returned should mean, that image should keep using
> old manual event polling mechanism and do not rely on input semaphore.

How much backwards compatibility do you need? Wouldn't it be easier to 
fix it and then switch?

Cheers,
   - Andreas



More information about the Squeak-dev mailing list