[etoy] Parts bins, copies, and siblings?

Ned Konz ned at bike-nomad.com
Mon Apr 7 18:42:54 UTC 2003

Everything worked great... but Karel's World doesn't actually work. 
The problem is that the motion happens fast enough that the beeper's 
don't get a chance to notice that the robot's over them.

"OK", I thought... I'll just tell all the beepers to look for the 
robot overlapping them at the end of each move.

So I added

	Beeper tellAll: seeIfRobotOverMe

at the end of Robot.move.

But that doesn't work. Why not?

I have a prototype beeper in a parts bin at the bottom. The Beeper in 
that parts bin is (say) a Player60.

When I drag out a new beeper, the Player60 class gets *copied* in its 
entirety. With no inheritance.

So #tellAll: doesn't work, as it's looking for Player60 subinstances. 
Which the new copies aren't, since they're copies.


So I need to do one of either:

* make a beeper generator button that will duplicate the Beeper and 
grab it with the Hand, or

* delay every step of the user script. Oops! how is this done?

Ned Konz

More information about the Squeak-dev mailing list