controlling the time a Morph takes to display itself

Andreas Raab andreas.raab at gmx.de
Fri Mar 19 10:14:45 UTC 2004


Stef,

> I would like a Morph to support arbitrarily complex display.
> The idea is to have (for each redraw) the display method stop
> after a given elapsed time so that the Morph does not slow
> down everything. Later on I'll be caching intermediary results
> so that the Morph will indeed be completely redrawn at some
> point, but at the moment I'm just trying to
> have it stop displaying, and I can't succeed.

The best way to do it is to use a form for caching the bits you want to see.
E.g., something where your drawOn: method just looks like:

    aCanvas drawImage: displayCache on: bounds origin.

Then, you can use the step method, a forked process or whatever more to draw
whatever you want to do on the displayCache.

> what am I missing here ?

Probably some weird complex interaction. Try the above - it's much simpler
to use and to understand.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list