How to animate scrolling?

Andreas Raab Andreas.Raab at gmx.de
Thu Jul 19 06:27:55 UTC 2001


Tim,

> I tried making my smooth scrolling method use
> 'self world doOneCycle' after each mini-scroll
> but that somehow managed to stop the main
> stepping. Very odd!

Not odd, but intentional. Each stepper gets (temporarily) removed from the
step list so that (unfixed) errors will implicitly prevent this morph from
further stepping (and thus from raising repeated errors). You can achieve
the desired effect by using a variant of #startStepping, e.g.:

step
	"Spawn a second (minor) step method"
	self startSteppingSelector: #minorStep.
	[self isNotFinishedYet] whileTrue:[
		self world doOneCycle.
	].
	self stopSteppingSelector: #minorStep.

Ah, yes and:
> I need to take a morph that is already owned
> and make it the visual top of the stack in the
> same owner. What do I do?

	aMorph owner addMorphFront: aMorph.

Cheers,
  - Andreas





More information about the Squeak-dev mailing list