Hi I have the following implemention of step in smalltalk
step
|dx dy|
[isPlaying]
whileTrue:[
speed := speed - 0.1.
dx := speed / 15 * 4 * direction cos.
dy := speed / 15 * 4 * direction sin.
speed <= 0
ifTrue:[isPlaying := false. self stopStepping.]
ifFalse:[
Transcript show:'(',dx,'@',dy,')';cr.
whiteBall position: whiteBall position + (dx@dy).
].
].
stepTime
^2.
and something very weird is happening when I open the transcript window and in the step method I have
Transcript show:'(',dx,'@',dy,')';cr.
the ball rectangle seems moving as an animation but if I close the transcript window and delete the line code
Transcript show:'(',dx,'@',dy,')';cr.
the ball rectangle seems to move right away from position A to position Y Please help why is it happening?
Thank you in advanced