Vermont Views defines a global error window, ERR_WNP, and automatically associates that window with each form you define in your application. If you do not want to use the Vermont Views error window, you can create your own.
The following code creates a one row window for error messages on the last row of the screen. The window has no border and has attribute LERROR.
|
vs_rowq() and vs_colq() return the number of rows and columns, respectively for the current screen.
To write an error message:
|
To remove the message:
|
The AUTOCLEAR option set in the call to sw_opt() forces Vermont Views to clear the error window's buffer each time the window is taken off the screen. If this option were not turned on for this window, the user would see the message "Undefined key" in the window the next time the window was put on the screen.