Mouse Click Fires mouseEnter: ??
Jim Rosenberg
jr at amanue.com
Sat Dec 20 23:26:27 UTC 2003
I have a class of my own which is working pretty well. It's a subclass of
RectangleMorph, and it has a fairly complex mouseEnter: method. As far as I
can tell this method does exactly what I want it to -- when there's a
"real" mouseEnter event, that is. I've been using it for months, and in the
process of hardening things for an exhibition, I'm *very* surprised to find
that my mouseEnter: method fires if the mouse is already inside the bounds
of this morph and I click the mouse button. Is this expected behavior? It
sure surprises the hell out of *me* ... I suppose this could be my own bug,
but I wonder if Morphic "just does this". Can I suppress this behavior
somehow?
I tried applying isMouseEnter to the argument of mouseEnter: with a return
in case this turned out to be false. This didn't change anything, so I'm
assuming that clicking the mouse really did send mouseEnter:. I guess it's
not the end of the world if I just have to live with this, but I'd like to
fix it if I can. It sure seems to me to be a bug *somewhere* ...
My class does *not* have a mouseUp: or mouseDown: method. I *think* my
interface will not break if I put in methods for these that just consume
the event and do nothing, but I'd have to test this. Is this what I have to
do??
-T.i.A., Jim
---
Jim Rosenberg http://www.well.com/user/jer/
WELL: jer
Internet: jr at amanue.com
More information about the Squeak-dev
mailing list
|