Interrupting in dialog boxes

Ben Rubinstein benr_mc at cogapp.com
Thu Sep 19 13:25:01 EDT 2002


Maybe I'm just a bad programmer...

I have several times got into a situation in which a program loop is
throwing up a lot of 'answer' dialogs.  Maybe I put in an alert for a
condition which I didn't think would happen very often; or I put an alert in
a loop, and understimated how fast Rev/MC would execute the rest of the
loop.  In either case, if alerts are thrown up in very quick succession,
there's no way to interrupt it.  Command-period/control-C doesn't get read
before another dialog appears - and the dialog eats it.

It doesn't have to be an infinite loop (though I've done those too, of
course) - if it's going to be another 1000 or so alerts, then I'm faced with
trying to remember how long it was since I last saved, and weighing up
forced-quit versus a lot of hitting enter.

Maybe I'm just a bad programmer, but I don't think a high-level programming
IDE should leave even a bad programmer resorting to a forced quit because of
a simple error.  Normally, you can simply interrupt - but only if you can do
so outside the context of a dialog box.

In my ideal world, 'exit to top' would similarly cancel everything if
executed inside the context of a 'modal' statement; but at least we can each
code round this ourselves.  The modest proposal for now is that an interrupt
processed during an alert, ask or answer statement should cancel the dialog
and take effect in the context of the statement.

 
  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866





More information about the metacard mailing list