ScrollBar>>animateValue: aNumber duration: anInteger     anInteger <= 0         ifTrue: [ self setValue: aNumber ]         ifFalse: [             | startTime start |             startTime := Time millisecondClockValue.             start := value roundTo: scrollDelta.             [ | delta |             [ (delta := Time millisecondClockValue - startTime) < anInteger ] whileTrue: [                 self setValue: (aNumber - start) * (delta / anInteger) + start.                 Processor yield ].                 self setValue: aNumber ]                     fork ]
Typically morphic animations should be implemented implemented using the built-in stepping mechanism (#wantsSteps, #step, ...), but that's not always possible.
I would say, that's the only way how morphs should animate themselves. Because if you do it otherwise (like in a loop), then you pausing a rest of processing, blocking UI etc and this is not good.
I agree, but the above code does not have that problem. In fact it works pretty well, i.e. when the system is busy/slow it just sets the end state of the animation.
A good example for morphs animation is bouncing atoms. But i'm not sure if it still residing in pharo images.
Now if somebody is looking for an interesting project I would suggest to implement CoreAnimation clone (http://en.wikipedia.org/wiki/Core_Animation). CoreAnimation is a beautiful and powerful object-oriented animation system for Cocoa. It should be strait forward to port the API, because Cocoa is essentially a nice implementation of Morphic. Lukas -- Lukas Renggli www.lukas-renggli.ch