QTIPS - Interrupt Proof Error Messages
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 JAN 1992 | 2.11+ | EXPERT | INTERRUPT, INPUT.CHAR, @PRIORITY.INT, ERROR, MESSAGE |
Cameron Christie of McAuley Consultants makes the point that it can be useful to prompt the user for input using INPUT.CHAR without allowing them to access TCL or record macros et al. He points out that the simplest way of achieving this is to save off the contents of @PRIORITY.INT, null @PRIORITY.INT then invoke INPUT.CHAR. When control returns to the calling program, restore @PRIORITY.INT.
This technique could be extended to displaying error messages on screen E.G.
Save_PI = @Priority.Int @Priority.Int = "" Call Msg("Fatal Error", "", "", "") @Priority.Int = Save_PI
(Volume 3, Issue 8, Page 9)