Help with morph and world refresh
ducasse at iam.unibe.ch
Sat Apr 5 12:16:00 UTC 2003
I want to implement a robot a la Karel that novices can program.
Using the step mechanism for that is not clear for me because the idea
is that kids
can define any kind of method in terms of the simple elementary one. So
I have everything working except this problem with the refresh of the
I have to think about your solution with the calculatePositionAt:
On Saturday, April 5, 2003, at 01:45 PM, Bob Arning wrote:
> 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...
> position _ self calculatePositionAt: Time millisecondClockValue.
> self goTo: position.
> self canPick ifTrue: [self pick].
> and make this run as often as possible...
Prof. Dr. Stéphane DUCASSE
"if you knew today was your last day on earth, what would you do
different? ... especially if,
by doing something different, today might not be your last day on
"The best way to predict the future is to invent it..." Alan Kay.
Open Source Smalltalks: http://www.squeak.org,
Free books for Universities at
Free Online Book at
More information about the Squeak-dev