Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!csus.edu!ucdavis!iris!lim From: lim@iris.ucdavis.edu (Lloyd Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing direct to a dialog window... Message-ID: <8988@ucdavis.ucdavis.edu> Date: 17 May 91 01:55:24 GMT References: <1991May15.131300.9898@umiami.ir.miami.edu> <1991May16.170121.7022@oceania.UUCP> <13295@dog.ee.lbl.gov> <1991May16.161520.9948@umiami.ir.miami.edu> Sender: usenet@ucdavis.ucdavis.edu Reply-To: lim@iris.ucdavis.edu (Lloyd Lim) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 28 In article <1991May16.161520.9948@umiami.ir.miami.edu> dweisman@umiami.ir.miami.edu (Ordinary Man) writes: >In article <13295@dog.ee.lbl.gov>, osborn@ux1.lbl.gov (James R Osborn) writes: >> [...] I find that it is much easier >> to install a userItem to do updating for specific drawing tasks >> than using a filter procedure and doing the updating myself. >> >> I like this because usually you don't need to write a filter proc. > >I agree. But what if one of your "userItems" is to be animated, in other words, >what if you need it to be updated everytime through ModalDialog's event loop. >Then you'd have to use the filter function. And if you're gonna use it anyway, >you might as well draw the other items when you get an update event from the >filter function. This updates all items even through a screen saver. If your dialog has things that are animated (like a progress bar, say), then it's probably a better idea to use IsDialogEvent and DialogSelect than to use ModalDialog. This gives you more flexibility both in the processing you can do in your own program and in background processing. To animate your items, you can just call the userItem procedures directly. In general, userItems are more reusable than filterProcs. Toolbox Karma actually works! :-) +++ Lloyd Lim Internet: lim@iris.eecs.ucdavis.edu America Online: LimUnltd Compuserve: 72647,660 US Mail: 215 Lysle Leach Hall, U.C. Davis, Davis, CA 95616