<br><br><div class="gmail_quote">On Fri, Feb 13, 2009 at 9:30 AM, Andreas Raab <span dir="ltr"><<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is why i thinking that even wrapping event buffer by specialized<br>
event subclass could be helpful.<br>
I.e.<br>
<br>
event := KernelMouseEvent from: eventBuffer.<br>
<br>
so, then you can write:<br>
<br>
event isMouseEvent<br>
instead of:<br>
(eventBuffer at: 1) = EventTypeMouse<br>
<br>
The idea is to promote most basic event types from Morphic-Events to<br>
Kernel-Events.<br>
So then another framework could reuse them as a base, without poking<br>
in raw event buffer.<br>
</blockquote>
<br></div>
Understood. Yes, this could be helpful for some purposes. The reason why I don't like it is that since a UI framework will require its own events to begin with (see above) why clutter the kernel with artificial distinctions about event types that the kernel really doesn't care about? What good would it do Morphic or MVC or Tweak if you were to add these events? Given the tiny interface between the sensor and its clients[*] it seems like a complication with very little benefit to me.<br>
<br>
[*] Never mind all the abuses of Sensor.</blockquote></div><br><br>If I had written EventSensor, this is how I would have done it because it makes code a lot more readable. I would make this event wrapper class only support the actual events coming from the VM; it is still the responsibility of the UI framework to synthesize the extra events.<br clear="all">
<br>The reason I asked my original question is because I'm working on Subcanvas (<a href="http://gulik.pbwiki.com/Canvas">http://gulik.pbwiki.com/Canvas</a>), which is a graphics and events API; it is a high-tech replacement for the Canvas class.<br>
<br>Gulik.<br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a><br>