Invisible Morphs getting and receiving clicks

Ross Boylan RossBoylan at stanfordalumni.org
Sun May 29 17:55:55 UTC 2005


I have a TwoWayScrollPane with morphs inside its scroller, a
TransformMorph.   When I scroll to the right, everything looks fine.

Call the "full window" the area onto which the "scroll window"
provides a view.  So when I scroll to the right, the full window is
moved to the left.

The problem is that events are still going through to the full
window.  When I mouse down outside of the scroll window, but in the
bounds of the full window, the click sometimes goes to a morph in the
full window.  When I drop an object, it goes to the full window.  This
happens even if I have other morphs that I've lifted to the top of the
screen, morphs that themselves accept clicks and drops.

I have enabled drop and drag in the TransformMorph.  The morphs within
it are supposed to be draggable; the problem is that they are doing
this even when they are outside of the scroll window.

Does anyone have any pointers on why this is happening?  I'm using the
tweaked classes I posted earlier.

One thing that I've wondered about is that I've stuck my morphs
directly in the TransformMorph, rather than putting a container
(perhaps a RectangleMorph or AlignmentMorph) in the TransformMorph,
and then the other Morphs in the container.

The explorer on the World PasteUpMorph does not seem to show my
submorphs directly, and all the bounds for the TwoWayScrollPane, its
scroller, and the contained Morph's look reasonable.

I conclude that my mouseDown is not going to the TwoWayScrollPane or
the TransformMorph, but that somehow the event mechanism knows where
my morphs inside of it are (which means its aware of the coordinate
transformation done by the TransformMorph) and is sending the mouse
event direct to one of those "inside" morphs.



More information about the Squeak-dev mailing list