Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sys.mac.programmer Subject: Re: Deactivating window behind StdFile dlog? Message-ID: <3776@uakari.primate.wisc.edu> Date: 18 Jan 91 17:10:29 GMT References: <11768@goofy.Apple.COM> Sender: bin@primate.wisc.edu Reply-To: bin@primate.wisc.edu Lines: 34 From article <11768@goofy.Apple.COM>, by lsr@Apple.com (Larry Rosenstein): > In article <3754@uakari.primate.wisc.edu>, bin@primate.wisc.edu (Brain in Neutral) writes: >> >> How do *you* solve the problem of deactivating the contents (not >> the frame) of the frontmost window when a standard file dialog >> comes up in front of it? > > A long time ago I considered how to do this in MacApp for any dialog (not > just Std File). The problem is that the Modal Dialog call throws away > events that aren't directed to a dialog. My solution was to patch Modal > Dialog so that I could supply a filter proc all the time. The filter proc > tested whether the event was for a dialog, and if not passed it through > MacApp's normal event handling code. Yes, I was actually thinking about the general case (any modal dialog or alert), but StdFile seemed a good one to focus on. Thanks for your comments. In the meantime, I've given a bit of thought to trying to solve this problem in general, such that an application can get the activates passed down to it (and updates, which are actually a more important problem). Some of the solutions I've come up with (and there are others) can be ftp'ed from indri.primate.wisc.edu (128.104.230.11) in the file pub/mac/TransSkel/TPN/TPN002.sit.hqx, if anyone's interested. I have pending revisions to this thing already (and I just put it there yesterday) but comments by anyone would be appreciated. It's some scribblings jotted down in connection with upcoming TransSkel revisions. I have another question: does ModalDialog() use IsDialogEvent() and DialogSelect(). Could one safely dispose of ModalDialog() altogether? -- Paul DuBois dubois@primate.wisc.edu