Path: utzoo!utgpu!water!watmath!clyde!att!ucbvax!decwrl!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: following the sliding prop gadget Message-ID: <71221@sun.uucp> Date: 3 Oct 88 00:41:17 GMT References: <2877@mtuxo.att.com> <4875@cbmvax.UUCP> <7263@well.UUCP> <2937@mtuxo.att.com> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Distribution: na Organization: Sun Microsystems, Mountain View Lines: 21 In article <2937@mtuxo.att.com> tas@mtuxo.att.com (XMPC2-T.SKROBALA) writes: > Thanks to all who offered their opinions and generally encouraged me to > keep looking. Now comes the followup question. I have the LockIBase() > there because all my windows share a common IDCMP port, and I want to > make sure that I don't process any messages left over from windows that have > been closed, so I check any incoming message's IDCMPWindow to make sure > that it still exists. First, I hope you null out your Window pointers after you close the windows, second when you get a message there isn't any need to call LockIBase() because you aren't going to do anything yet that will affect a window. So when you get a message, copy it, reply to it, and then check to see if it's window pointer matches any of your open window pointers. If you keep them in an array this is pretty easy. If it doesn't you just ignore the message. If it does, then you know that the window is still open so you go ahead and process it appropriately. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.