Modal dialog boxes
suck.
A traditional "modal" dialog box is a dialog box that prevents you from interacting with anything other than itself. Clicking outside of the dialog box is futile; you may not leave the box, and attempting to do so will result in beeps or nothing. Your OS's multitasking abilities, no matter what they may be, are suspended until the box is exited naturally through OK or CANCEL. You do not see purely modal dialog boxes in OSes with true multitasking; they generally exist as artifacts of the non-multitasked past of an OS which later had multitasking grafted on after the fact. Examples of contemporary OSes that allow this this kind of behavior are the Mac OS and Windows 9x.
Modal dialog boxes come in three variants.- The first is the most purely evil kind, in which multitasking literally ceases and all background processes grind to a halt. This does not ever happen, as far as i am aware, in windows 9x. It is still theoretically possible to create one of these in the Mac OS due to the horrors of cooperative multitasking, although recent mac os versions have managed to dampen and possibly even negate the effect on background processes when the modal dialog is put up. This is, of course, not to say it isn't still a big problem.
- The second, irritating but not quite as evil kind allows background processes to keep going, but still won't let you leave; all user input has to go to this box. The problem with such boxes comes when they are demanding some form of information, such as a social security or serial number, which is stored elsewhere on the computer-- in a place you can't get to, because the modal dialog box has taken over your machine. Which is still very evil. I once had an installer running under windows 98 somewhere that popped up a box demanding i change some obscure system setting somewhere, and refused to go on with the installation until this system setting was fixed-- but because it was modal, refused to let me out of the box. There was, tragically, no cancel, and OK just brought the box up again, refusing to go away until i did something that was impossible while the box was up. This unhappy situation was finally resolved with ctrl-alt-del.
- The third kind, locally modal dialog boxes, are not really evil at all, and are really rather reasonable; you may switch into another program, and other programs run, but you can't do anything in the program with the modal dialog until the modal dialog is dismissed. A few (not many) windows programs i have seen have a particularly insidious variant of this one, where despite the fact all input and events not going into the locally modal dialog are being ignored, you can still move around and handle windows. Which means that you can accidentally click and make one of the other windows active, although you won't be able to do anything in it until the modal dialog is dealt with. Except at this point your modal dialog is hidden behind the active window, and you've probably forgotten it's there, and you will probably wind up ending this with a force quit.
Apple has, thankfully, managed to purge their software of modal ways in the
we're terribly sorry our OS has no kernel environment that sprung up after the
don't worry, everything will be OK when we finish copland environment died horribly, and began with
Mac OS 8, which used preemptive threading in the finder and was the first mac os version in which the
file copy dialog was non-modal. Apple has since then either destroyed all modal dialogs in their software, or in a worst-case scenario (the system is out of memory..) made the dialog of the third,
local type listed above. They have also made it effortless for developers to do the only-locally-modal boxes, made all dialogs summoned through the system (file open/save) non-modal or locally modal, and discourage developers from using modals-- the
ModalDialog() function is still valid for
backwards compatibility, but the
documentation and
header files have been markings saying something along the lines of "
FOR THE LOVE OF GOD, DO NOT CALL THIS FUNCTION!". In fact, the only non-local modal dialog box you're likely to come across these days in the mac os is, oddly enough, the progress bar box
Quicktime throws up when it's converting from one
format to another-- which even odder was, until very very recently, the first, most evil kind of modal dialog.