Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: A few Q's from a novice... Message-ID: <1990Sep5.162541.27771@ux1.cso.uiuc.edu> Date: 5 Sep 90 16:25:41 GMT References: <10602.26e3f796@ecs.umass.edu> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: dorner@pequod.cso.uiuc.edu (Steve Dorner) Organization: University of Illinois at Urbana-Champaign Lines: 18 >1) How do most people handle updating the contents of a window when >something in front of the window disappears (another window, dialog, etc)? >Do you use off-screen copies of the contents of your windows? Some funky >data structure? I use a "funky data structure". Whatever you use, it's a good idea to do ALL your drawing in response to update events (unless you're doing animation of some kind). Then, when you want to redraw a particular thing (because it has changed, perhaps), you merely Inval{Rect,Rgn} it, and the system will eventually send you an update event for it, at which time you can draw what needs to be drawn. This approach WILL simplify your life, at least a little. Steve -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner