[comp.sys.mac] Modal dialogs vs. layer switching

amanda@lts.UUCP (Amanda Walker) (01/12/89)

Note that inhibiting layer switches is done solely on the basis of the
variation code of the front window, not whether ModalDialog is being
called.  Since the variation code for a dialog's window is part of the
ProcID field in the dialog's DLOG resource, you should be able to go in
with ResEdit or REdit and change dialogs to use, say, altDBoxProc and
thus make them only modal to their own layer (since that's controlled
by ModalDialog), without having to modify any application code.

I think it's pretty reasonable for MultiFinder to run "defensively",
since it has no way to know what the purpose of any given dialog is,
and thus whether or not it should allow layer switches.  Editing the
ProcID field of "safe" dialogs amounts to telling MultiFinder what's
going on a little bit...

-- 
Amanda Walker			...!uunet!lts!amanda / lts!amanda@uunet.uu.net
			  InterCon, 11732 Bowman Green Drive, Reston, VA 22090
--
Calm down; it's only ones and zeros...

jackiw@cs.swarthmore.edu (Nick Jackiw) (01/14/89)

In article <878@lts.UUCP> amanda@lts.UUCP (Amanda Walker) writes:
> 
> Note that inhibiting layer switches is done solely on the basis of the
> variation code of the front window, not whether ModalDialog is being
> called.  Since the variation code for a dialog's window is part of the
> ProcID field in the dialog's DLOG resource, you should be able to go in
> with ResEdit or REdit and change dialogs to use, say, altDBoxProc and
> thus make them only modal to their own layer (since that's controlled
> by ModalDialog), without having to modify any application code.
> 
> Amanda Walker			...!uunet!lts!amanda / lts!amanda@uunet.uu.net
> 			  InterCon, 11732 Bowman Green Drive, Reston, VA 22090
> --

Hmm. I thought about this yesterday, but in all the apps I've actually tried
it on, I either get bombs (as soon as the call goes to _ModalDialog) or I get
dBoxProc "layer-freeze" behavior regardless of the ProcID.  It DOES seem like
switching out of modals shouldn't be too detrimental, in most cases: your
layer's back-windows wouldn't get updated, but that's no problem.  Does any-
one on the NET know the full set of criteria which MultiFinder employs to
keep from switching?  Additionally, does anyone know why a call to ModalDialog
might address-error-bomb simply based on the ProcID?  I'm perplexed.

Follow-ups to *.programmer.


-- 
+-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+
|  nicholas jackiw  | jackiw%campus.swarthmore.edu@swarthmr.bitnet           |
+-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+
                          PER ASPERA AD ASTRA