home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!charon.amdahl.com!netcomsv!netcom.com!leonardr
- From: leonardr@netcom.com (Leonard Rosenthol)
- Subject: Detecting modal dialog (Re: When is a menu disabled?)
- Message-ID: <1993Jan27.201359.25344@netcom.com>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- References: <walkerj.728102613@milo.math.scarolina.edu> <toge-270193142420@130.87.65.24> <walkerj.728144645@milo.math.scarolina.edu>
- Date: Wed, 27 Jan 1993 20:13:59 GMT
- Lines: 26
-
- In article <walkerj.728144645@milo.math.scarolina.edu> walkerj@math.scarolina.edu (Jim Walker) writes:
- >In <toge-270193142420@130.87.65.24> toge@kekvax.kek.ac.jp (Nobu Toge) writes:
- >
- >>> I can't think of any good way to tell when a modal dialog is in
- >>> front, either.
- >
- >>Call _FrontWindow or look up WindowList and look at the windowKind of
- >>the front-most window. You can judge by looking whether it's dialogKind
- >>or others. I'm using this in my init and it works rather nicely.
- >
- >dialogKind does not distinguish between modal dialogs and modeless or
- >movable modal dialogs. It appears that spareFlag is true for modal dialogs
- >and false for other dialogs, but I don't think that is documented.
- >
- I don't think it is documented either, but this is how MultiFinder used
- to determine whether you could switch layers or not when a dialog was up - if
- spareFlag was set it wouldn't switch. So by clearing spareFlag in a filterProc
- you could actually do a "movableModal" and still call ModalDialog (though why
- you would want to is another story?!?!).
-
- --
- -----------------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@netcom.com
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, Inc. GEnie: MACgician
-
-