Help with morph and world refresh

Bob Arning arning at charm.net
Sat Apr 5 11:45:04 UTC 2003


On Sat, 5 Apr 2003 10:37:01 +0200 Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
>I have the impression that this is a really bad practice to explicitly 
>wait for the refresh but I do not know how to do it in a better way.
>
>Have you suggestion to fix my problem?

It sounds as if you really want to slow the robot down to some sort of "realistic" rate of progress so that you can actually see it doing stuff. The morphic approach would be to use a #step method...

step

	position _ self calculatePositionAt: Time millisecondClockValue.
	self goTo: position.
	self canPick ifTrue: [self pick].

and make this run as often as possible...

stepTime

	^1

Cheers,
Bob



More information about the Squeak-dev mailing list