I was just watching a rather good video about the workings of the new dict object but was baffled by how the paintoval message worked. In particular, when multiple paintoval messages were sent with different values, why did a new oval not appear (and what if in fact you wanted multiple ovals?)
There’s clearly some hidden state being kept around so that the "old" oval is erased first. Where is that?
Duh….I missed that. But clearing the entire canvas every time is a very heavy handed mechanism which of course won’t work if you want multiple objects. I thought that there might have been some "sprite" stuff going on that was just being glossed over as the tutorial was really about dict.
But thanks for pointing out what was happening.
You’re right that sprites would be a good way to handle such drawing if you have many moving objects to draw. (However, the Jitter equivalent, jit.lcd, does not support sprites; there you have to keep track of objects on your own.)
Here’s a bit on sprites in lcd: