For information on the Notification framework, see Desktop Frameworks Concepts.
The program doesn't require notification--which is meant for broadcasting to multiple receivers--because buffer updates are received by only one view. However, to add multiple views to the program (such as a radar view to see incoming asteroids), notification is ideal. Building in this flexibility is smart and has minimal effect on performance.
NOTE
The view draws the entire buffer to the screen. Drawing the entire buffer is quicker than drawing only the damaged area.
Updating the view
from the buffer
When the view receives the refresh notification, it draws the buffer to the screen. To guarantee that the image doesn't change before the draw operation can complete, the view lets the model know when it wants to draw and when it has finished drawing. The model blocks the refresh thread appropriately.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker