Investigating fullBounds/layoutChanged

Eddie Cottongim cottonsqueak at earthlink.net
Fri Oct 18 02:26:23 UTC 2002


Andreas said:
> Secondly, think about it - the hand (aka "the user representation", "the
> mouse impersonation") is a morph too, yes?! So the hand is a morph, and
> if a morph moves it has to notify its parent about that change which in
> turn will invalidate its layout. So that, whenever you move your cursor,
> the hand will notify its parent (the world) which will in fact send a
> layoutChanged. If no layoutChanged would be sent if the hand moves then
> something would be horribly broken.

I see what you are saying, but it seems like the hand is a special case. For
most morphs,
it is important to send the owner layoutChanged so that the owner can redo
its own layout
to accomodate the child's change. But there is no reason I can find that the
World would
want to redo its layout because of a mouse move event. The Hand may be
technically a
child of the World, but its position changing should not cause layout
invalidations in the way that
any other child's movements would. Of course, sometimes you want to know
about mouse
moves, and you use the regular event handling for that.

Maybe its worth overriding position: in HandMorph not to send owner
layoutChanged. Mouse
move events come in at a pretty high rate and chew up a considerable amount
of time, especially on
a slow system, so optimizing this special case could help. I'm trying it
right now(attached), and so far there
are no ill effects.

Eddie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HandMorphLayoutChanges-efc.1.cs.gz
Type: application/octet-stream
Size: 623 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021017/486f4868/HandMorphLayoutChanges-efc.1.cs.obj


More information about the Squeak-dev mailing list