moving objects on screen on synchronous mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

moving objects on screen on synchronous mode

Antonio Moreno
Hi all,
I have several objects moving and they must refresh their position on screen on synchronous mode.
Is there is any way to make something lika a display buffer?
I mean, to perform the positioning of objects without changing what you see on the display, and finally, refresh the display when everything is ready for viewing.


Regards
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: moving objects on screen on synchronous mode

Bert Freudenberg

On 25.03.2011, at 14:31, Ton wrote:

Hi all,
I have several objects moving and they must refresh their position on screen on synchronous mode.
Is there is any way to make something lika a display buffer?
I mean, to perform the positioning of objects without changing what you see on the display, and finally, refresh the display when everything is ready for viewing.

That's how Morphic works in general. You change object's positions in their "step" methods. Only when all step methods were executed, the main loop disables screen updates, redraws the changed objects, then enables screen updates again (see senders of deferUpdates:).

- Bert -



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners