Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!kampi.hut.fi!jmunkki From: jmunkki@kampi.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: A *** SERIOUS *** (but small) BUG IN SUITCASE II! Message-ID: <24321@santra.UUCP> Date: 9 Aug 89 00:05:59 GMT References: <21867@andante.UUCP> <24320@santra.UUCP> Sender: news@santra.UUCP Reply-To: jmunkki@kampi.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, Finland Lines: 20 This is a followup to my original article. At that time I still hadn't thought of a reasonable fix to the problem. Here's what I decided to do: StartSetup(); /* This calls InitWindows among other things. */ GetPort(&WindowManagerPort); do /* my main event loop */ { /* The following line fixes a bug in Suitcase: */ if(thePort != WindowManagerPort) SetPort(WindowManagerPort); ... Can anyone think of a reason why this wouldn't work? I wanted to optimize things, so I use thePort instead of calling GetPort. Usually I avoid this kind programming, but this time I think it can't hurt to use a global. _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ | Juri Munkki jmunkki@hut.fi jmunkki@fingate.bitnet I Want Ne | | Helsinki University of Technology Computing Centre My Own XT | ^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^