Custom Event Handler

Andreas Raab Andreas.Raab at gmx.de
Tue Aug 7 15:43:37 UTC 2001


Josh,

> However, I can't figure out how to get access to
> mouseEnter/Leave events without generating my own
> by watching when and where mouseOver events happen.
> It seems that the processEvent:using: hook just provides
> access to the raw hardware input events, and not to
> events that are subsequently derived from
> these events.  Is this correct?

Almost. Enter/leave events are generated based on which morphs the hand is
currently "over". This is determined by sending mouse over events which are
handled by morphs in such a way that they tell the hand if the event ends up
inside. Based on this information, the hand sends enter/leave events
directly to those morphs. Note that we really can't go through the event
dispatcher here - we need to figure out what has changed since the last
mouse position which is different from just delivering an event to the right
receiver.

> Can anyone with experience with custom event handlers suggest
> another way?

For what? I don't quite see how one would reasonably implement a dispatch
strategy for enter/leave. I'm also a bit confused about the subject of your
message - what you're describing in the above means you're changing the way
events are dispatched (e.g., delivered); not how they are handled. Perhaps
you can explain what you're trying to achieve?!

Cheers,
  - Andreas





More information about the Squeak-dev mailing list