Informix Error -1142
-1142 Window is too small to display this form.
The window dimensions of the current window are too small to contain the form that is to be displayed. Review the window dimensions, and compare them to all forms that will be displayed in that window. The dimensions of the form are established in the form-specification file with the SCREEN statement. The dimensions of the window are set during the OPEN WINDOW statement, either directly or by opening the window WITH a particular form.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1142 fires when the current window's dimensions can't contain the form being displayed in it —
per the official guidance, form dimensions come from the form specification's SCREEN
statement, while window dimensions come from the OPEN WINDOW statement — these two can
disagree.
- A window opened smaller than the form's
SCREENdimensions, per the official guidance — the direct, only cause. - The same window later used to display a different, larger form, per the official guidance's own suggested review — a window sized for one form may be too small for another.
Solutions / Resolution
- Review the window size against all forms that will be shown in it, per the official
guidance, comparing the form specification's
SCREENdimensions against theOPEN WINDOWdimensions. - Open the window with dimensions at least as large as the largest form it will display.
Examples
A window smaller than the form's SCREEN dimensions
-- form specification: SCREEN SIZE 20 BY 78
OPEN WINDOW w1 AT 1, 1 WITH 10 ROWS, 40 COLUMNS
DISPLAY FORM "order_entry"
-- -1142: the window (10x40) is smaller than the form's own SCREEN dimensions (20x78)
Diagnostic Checks
- Compare the form specification's
SCREENdimensions against the window's actual dimensions, for every form displayed in that window.
Related Errors / Related Topics
- -1136 — "Window is too large to fit on the screen." A related window-sizing error, about the window exceeding the terminal rather than being smaller than the form it needs to hold.
The window is smaller than the form's SCREEN dimensions — open it at least as large as the
largest form it will display.