33

I always have trouble remembering whether the modal or modeless dialog is the one blocking operations in other parts of the application.

Does anyone know why they are called that way?

andreas buykx
  • 12,608
  • 10
  • 62
  • 76
  • 1
    +1 Always wondered this! – Skilldrick Oct 22 '09 at 14:49
  • I wonder, perhaps does this have any relationship to unimodal/bimodal/multimodal as used in statistics? After all, those each describe a peak that rises to the top of a distribution (as with a histogram), and a modal dialog does indeed rise to the top above all other windows on the z-axis. Just a thought... – Matt Johnson-Pint Feb 08 '21 at 02:59

4 Answers4

26

With a modal dialog, you set your application in a particular mode (a different "state" if you will), whereby only actions pertaining to that "mode" are accepted, hence preventing UI actions outside of the dialog.

At Andreas' prompting I thought I may have to dig dusty Windows API books, as often, the etymology/origin of a word or expression that has became broadly accepted is only found in early documentation, but in fact we still see this referenced in an online glossary from MS. The Modal entry reads (emphasis is mine):
modal
Restrictive or limited interaction due to operating in a mode. Modal often describes a secondary window that restricts a user's interaction with the owner window. See also: modeless.

Calmarius
  • 18,570
  • 18
  • 110
  • 157
mjv
  • 73,152
  • 14
  • 113
  • 156
4

I believe this is a tip to Linguistic Modality. "Modal" dialogs are used (typically) to present information that falls into the typical modals of:

  • Declarative
  • Interrogative
  • Exclamatory

Part of why I feel this is the case, although I'm searching for a more definitive answer, is the way modal dialogs are discussed. For example, take MSDN - their criteria is "Dialog boxes that display important messages should always be modal.", which could easily be rewritten as "Dialog boxes whose content is of a declarative modal [linguistic definition of modal here] should be created as Modal windows."

There is other precident for this. For example, the word "dialog" in dialog box - it's called a "Dialog box" because it's supposed to be presenting a dialog, or conversation, between the system and user - another throwback to linguistic terminology for a computational process.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • Interesting. But why would the term originate from linguistics? Are there influential GUI developers that have a background in linguistics? Some other connection? Also, googling for modeless reveals hits only related to GUI dialogs not to anything else that is remotely connected: the term 'modeless' doesn't seem to be the exact opposite of modal. – andreas buykx Oct 26 '09 at 15:17
  • Not sure *why* exactly,b ut as I mentioned, there were a lot of terms borrowed from linguistics and other non-technical related fields. I think it was more because some of this came from human-computer interaction studies, not technical people. – Reed Copsey Oct 26 '09 at 16:31
  • speculation. doesn't link to a Microsoft source that confirms this "theory". – Anonymous Type Nov 29 '10 at 00:27
  • @Anonymous Type: Microsoft isn't the only company in the world, nor necessarily the "official source" for computer science issues. "Modal" and "Modeless" are used outside of the realm of Microsoft's use of the terms... – Reed Copsey Nov 29 '10 at 17:03
  • Very true, so show me an offical source from another distributor of operating systems (i.e. a founder of technology that uses modal AND modeless windows) – Anonymous Type Nov 29 '10 at 21:43
4

A modal system is one with multiple "modes of operation". Such a system switches between modes by using key strokes, for example "Esc" "CTRL+S". A good example is the Vim text editor which switches between "edit text mode" and "navigate text mode".

A modal dialog is thus one which blocks the main program by switching it to a different mode for the duration of the operation.

ddd
  • 41
  • 1
  • mmm - "modeless" doesn't necessarily fit with that, though, does it? It's tough to say that any window has "no mode of operation"... – Reed Copsey Oct 22 '09 at 14:56
0

Looks like the only reason is that it is related to modes and mode errors.

amit
  • 10,612
  • 11
  • 61
  • 60