Re: modal dialogs
Scott Meyers <smeyers-Q9ZaqOuDrMJWk0Htik3J/[email protected]> Tue, 05 Aug 2003 19:42:09 -0700
| Newsgroups | gmane.comp.programming.keyholes |
|---|---|
| Message-ID | <[email protected]> |
At 11:25 AM 8/3/2003, Thomas Porschberg wrote:
>I'm not sure if it this count as a keyhole but at least it obstruct the view
>of the big, wide, wonderful world for a certain time. I speak from dialogs
>called "Modal dialogs" (This term was used in Borlands C++ builder guide).
I'm a modal-dialog-hater from way back, but I don't think of them as
keyholes. The reason is unlikely to be obvious, however.
For me, the "Aha!" moment wrt keyholes was when I realized that keyholes
were just a manifestation of magic numbers in code. We already recognize
that magic numbers are bad programming practice, so, I reasoned, if I can
just get people to understand that fixed-size windows, fixed-size buffers,
fixed-length drop-down lists, etc., are just manifestations of a single
underlying problem (the use of a magic number in code), I can build on what
is already widely accepted (that magic numbers in code are bad) and thus
attack all of these problems simultaneously. "The Keyhole Problem" (TKP)
is just my name for programming using magic numbers.
To me, modal dialogs are conceptually different. Their use doesn't reflect
an underlying magic number, it reflects a decision to use a modal dialog.
Sure, I can cast it in the form of a keyhole ("only one of an application's
windows may be active at once"), but my goal is not to bring as many
problems as possible under the keyhole umbrella. My goal is to make the
concept behind a keyhole as clear as I can so that it becomes a useful
additon to the software development vocabulary. While I continue to
believe that thinking of keyholes as "gratuitous restrictions on things you
can see or express" is a useful way of describing keyholes, not all such
restrctions are keyholes.
Scott