extending maloney's TestMorph

Ned Konz ned at bike-nomad.com
Wed Sep 26 02:47:21 UTC 2001


On Tuesday 25 September 2001 06:58 pm, Lyn A Headley wrote:
> I've been trying to extend John Maloney's TestMorph to bounce up and
> down forever.  My plan of action was:

[snip]

> I realize I could simply fill the collection at initialization time,
> but my real question is: why is my morph getting put on the stepList
> and sent step messages?

How are you creating the Morph? If you're doing something like openInWorld, 
it starts stepping. If you just say TestMorph new, it won't step. Basically, 
as soon as you put your Morph into the World, it starts.

Anyway, if you want it not to step, just make a wantsSteps method that 
returns false. Then when you want to start, make sure that wantsSteps will 
return true; then call startStepping.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list