[Newbies] Re: Timer in Morph

Andreas Raab andreas.raab at gmx.de
Thu Feb 4 21:37:38 UTC 2010

Garret Raziel wrote:
> hi, can anyone help me with some code? I want to have a Morph object 
> that change his color by values that squeak gets from SerialPort. I have 
> wroted code of getting values and changing color but I dunno how to do 
> that the morph change its color forever. If i call method "AMorph 
> changeColor" in some to:do: it stucks and shows only last color. I want 
> to use some kind of timer, that will call this method every second and 
> updates this Morph. what must I use?

Use stepping, i.e.,

	"Yes, please"

	"1/sec please"
	^1000 "msecs"

	self changeColor.

   - Andreas

More information about the Beginners mailing list