[plt-scheme] move-to in refresh

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Aug 5 17:07:41 EDT 2004

At Thu, 5 Aug 2004 13:31:59 -0400, "Mike T. Machenry" wrote:
> Is it not allowed to call move-to from within refresh?

I think that's the `move-to' called will have to be disallowed. It's no
immediately obvious how to fix the contracts (and docs), though, to
formalize the prohibition.

The problem is that `refresh' is called when the owning editor is
redrawing itself. The `move-to' for the owned editor triggers a resize,
which gets propagated to the owning editor --- but the owning editor
can't accept the resize, because it's busy redrawing.

When the owning editor is a text%, it effectively realizes that it
can't handle the resize and just gives up. A pasteboard%, in contrast,
doesn't notice and ends up waiting on a lock that is held during
redraws (i.e., it deadlocks).

In general, an editor should not change its shape during a `refresh'


Posted on the users mailing list.