[squeak-dev] Re: EventSensor questions
Andreas Raab
andreas.raab at gmx.de
Thu Feb 12 17:46:29 UTC 2009
Michael Rueger wrote:
> Andreas Raab wrote:
>> I'm not sure if having multiple listeners is useful at this level -
>> all EventSensor does is pulling the events from the VM, packaging them
>> up and passing them into the event queue for any downstream consumers.
>> If there were multiple listeners in a morphic environment, they should
>> probably be registering with the hand (which has such a listener
>> mechanism already), not with Sensor. What's the use case for this
>> refactoring?
>
> The refactoring allows for listeners *outside* the morphic environment
> to listen to input and window events, supporting alternative UI
> frameworks like e.g. Miro.
Miro must be an unusual framework then (where is it?). Generally
speaking, Squeak UI frameworks all have the need for some sort of
top-level desktop (representing Display) which is the natural (and
generally only) receiver for events from Sensor. That is true for MVC,
Morphic, Tweak etc. The only situation in which I could imagine not
having a desktop representative is when it comes to native windows (in
which case there is a native desktop that Squeak doesn't control) and
here one obviously wants to dispatch events to all the different
windows. Although even here I would probably opt for a dispatch table in
Sensor mapping window IDs to event queues instead of a straightforward
listener.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|