Morph update
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Mon Dec 2 12:59:36 UTC 2002
On Mon, 2 Dec 2002, David Duke wrote:
> A question similar to one that Stefan Champailler asked around a week
> ago. I have a morph, and I want to force its redisplay. However, I
> want to avoid using the built-in stepping mechanism (as Karl Ramberg
> suggested in his reply to Stefan). What I really want is to send a
> message to the morph directly, with the sender being blocked until the
> morph has actually been redrawn. Looking through the protocol or
> "morph" didn't reveal anything obvious --- can anyone suggested an
> appropriate message, or if there is some indirect way of forcing an update?
canvas := Display getCanvas.
morph fullDrawOn: canvas.
canvas forceToScreen: morph bounds.
But are you sure you need to do this? It obviously violates Morphic's idea
of managing the World. Why isn't sending #changed to the morph enough? It
could be followed by a #refreshWorld, if really needed.
-- Bert
More information about the Squeak-dev
mailing list
|