Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!matthews From: matthews@eleazar.dartmouth.edu (Jim Matthews) Newsgroups: comp.sys.mac Subject: Re: multitasking and IPC (was: System 8.0: no more DA's.) Message-ID: <11714@dartvax.Dartmouth.EDU> Date: 11 Jan 89 02:52:49 GMT References: <1988Dec16.191309.21623@cs.rochester.edu> <326@internal.Apple.COM> <23343@apple.Apple.COM> <482@pyuxf.UUCP> Sender: news@dartvax.Dartmouth.EDU Reply-To: matthews@eleazar.dartmouth.edu (Jim Matthews) Organization: Dartmouth College, Hanover, NH Lines: 37 In article <482@pyuxf.UUCP> asg@pyuxf.UUCP (alan geller) writes: >My question, though, is: > WHY can't layer switches happen when a modal dialog is displayed? > Or, alternatively, would it be possible to create a type of dialog > that would be 'layer modal' rather than 'system modal'; > that is, if such a dialog were displayed, then no other > window/dialog/menu/control/etc. in the owning layer and > task would be available to the user, but the user could > switch layers (to a different task) if so desired? I wondered about this myself when MF came out. I maintain a network terminal emulator that I wanted to do file transfer in the background, even though it won't let you get to another terminal session while file transfer is in progress. The trick is to fool MultiFinder about the "modality" of your dialog. MultiFinder considers a dialog to be modal if the window uses variation 1 (dBoxProc) of the window definition procedure. So if you use variation 2 (plainDbox), and point a userItem to a routine that draws the characteristic dBoxProc frame, you get a good approximation of a "normal" modal dialog. The frame takes an instant to draw, so it flickers some when the dialog is first updated. That's a pain, but it's worth it to be able to switch programs while a big file is coming down the wire. Here's my userItem procedure: procedure fakeDBox(wp : WindowPtr; itemNo : integer); var r : Rect; begin r := wp^.portRect; InsetRect(r,2,2); PenSize(2,2); FrameRect(r); PenSize(1,1); end; Jim Matthews Dartmouth Software Development