Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!ucsd!nosc!dog.ee.lbl.gov!ux1.lbl.gov!osborn From: osborn@ux1.lbl.gov (James R Osborn) Newsgroups: comp.sys.mac.programmer Subject: Re: UpdateEvt question Message-ID: <14228@dog.ee.lbl.gov> Date: 13 Jun 91 06:13:09 GMT References: <6446@ns-mx.uiowa.edu> Reply-To: osborn@ux1.lbl.gov (James R Osborn) Organization: Lawrence Berkeley Laboratory Lines: 57 X-Local-Date: Wed, 12 Jun 91 23:13:09 PDT In article <6446@ns-mx.uiowa.edu> wolf@piquet.cipl.uiowa.edu (Michael J. Wolf) writes: >Situation: > > Several windows opened for my application > Using some for copying between on offscreen grafport > >Problem: > > When a dialog pops up, then is closed, the obscured >portion of the windows are also erased, so I need to update >them. I catch the update event, check which window via >FindWindow(Where). Then use if structure to see which NO! You are supposed to use "(WindowPtr) theEvent.message" as the pointer to the window that needs updating. Most likely all of your problems are due to the fact that you are not doing the update for the proper window. The window manager just keeps posting update events until your strange way of doing it finally gets around to updating the proper window. >window to update (as each may be different). Then I do >what is need to update the window. > >Catch: > > The window only actually gets updated when the mouse >passes into the windows content region. And it will keep >repeating the update until the mouse is moved out. This >occurs even when the window doesn't need updating any longer. > >I call Begin and End update surrounding thje code that does >the update for each window. So why is the update event not >being thrown out after I do the update, or likewise, why is >it continually getting an update while the mouse is in the >window? > >Should I be finding the window to update differently? Yes, see above. > >Thanks in advance. > >Michael You're welcome. -- James .------------------------------.--------------------------------------. | James R. Osborn | It just goes to show you it's always | | Lawrence Berkeley Laboratory | something. Either it's baffling | | osborn@ux1.lbl.gov | tech notes or your mac is smoking. | | (415) 548-8464 | It's always something... | '------------------------------'--------------------------------------'