Hi, all. I'm trying to give the user radio buttons to select one of up to 10 choices for a field value. The DDS compiler is giving me error "CPD8186" (Field extends outside window/pull down...).
I'm using the SNGCHCFLD keyword in a window. (I've already encountered the bug (?) that requires compiling with RSTDSP(*YES) to avoid a RNX1251 runtime error.) The window is 56 characters wide, and the text for each choice is very short (2 characters). I'm setting the *NUMCOL parameter for SNGCHCFLD to "5" and the *GUTTER parameter to "2" to present the choices on two lines.
When I list 9 choices, there is no problem. The DDS is in part as follows:
And the window appears like this:

But when I attempt to add a 10th choice (uncommenting the CHOICE and P-field lines shown above that mention "W6CHOTERM0"), I get the CPD8186 message on field W6TERMCHC.
This puzzles me, as it would appear that this 10th choice would fit nicely under the 5th choice! Each line of 5 choices, with gutter and all, requires only 28 characters ((5 choices * 4 characters each) + (4 gutters * 2 characters each)).
BUT, when I changed the starting column of W6TERMCHC from column 7 to column 1, the DSPF compiles OK, and the window appears like this:

Has anyone seen similar behavior before, or can anyone suggest what's going on? Most users will probably have only 3 choices, and I hate to have 3 radio buttons skewed so far to the left.
I'm wondering if there isn't a bug in the DDS compiler whereby it fails to recognize that the choices are arranged on two lines and will fit in the width of the window when I start at column 7. And why does it compile when starting in column 1, even though fitting all the choices on one line would require 58 characters (2 more than the window width)?
Anyone? Anyone? Bueller?
I'm using the SNGCHCFLD keyword in a window. (I've already encountered the bug (?) that requires compiling with RSTDSP(*YES) to avoid a RNX1251 runtime error.) The window is 56 characters wide, and the text for each choice is very short (2 characters). I'm setting the *NUMCOL parameter for SNGCHCFLD to "5" and the *GUTTER parameter to "2" to present the choices on two lines.
When I list 9 choices, there is no problem. The DDS is in part as follows:
Code:
A R DR02W1056F A WINDOW(3 11 10 56 A *NOMSGLIN *RSTCSR) A WDWBORDER((*CHAR ' ') - A (*DSPATR RI)) A WDWTITLE((*TEXT &W1056TITL) - A (*COLOR WHT) (*DSPATR UL) + A *CENTER *TOP) A . A . A . A R DR02W06 A WINDOW(DR02W1056F) A OVERLAY A CF04(04 'Prompt') A CF12(12 'Cancel') A RTNCSRLOC(*RECNAME A &W6CSRREC &W6CSRFLD) A W6CSRREC 10A H A W6CSRFLD 10A H A 1 2'Provide required tag informa- A tion, then press <Enter>.' A COLOR(BLU) A 2 12'Tag Purchase Date:' A DSPATR(HI) A . A . A . A 6 09'Tag Term2:' A DSPATR(HI) * A W6TERMCHC 2Y 0B 7 07SNGCHCFLD(*RSTCSR *AUTOSLT + A *SLTIND *NOAUTOENT + A (*NUMCOL 5) + A (*GUTTER 2)) A 71 CHOICE(1 &W6CHOTERM1) A 72 CHOICE(2 &W6CHOTERM2) A 73 CHOICE(3 &W6CHOTERM3) A 74 CHOICE(4 &W6CHOTERM4) A 75 CHOICE(5 &W6CHOTERM5) A 76 CHOICE(6 &W6CHOTERM6) A 77 CHOICE(7 &W6CHOTERM7) A 78 CHOICE(8 &W6CHOTERM8) A 79 CHOICE(9 &W6CHOTERM9) A* 80 **** CHOICE(10 &W6CHOTERM0) * The following fields are assigned the text for each choice. A W6CHOTERM1 2A P A W6CHOTERM2 2A P A W6CHOTERM3 2A P A W6CHOTERM4 2A P A W6CHOTERM5 2A P A W6CHOTERM6 2A P A W6CHOTERM7 2A P A W6CHOTERM8 2A P A W6CHOTERM9 2A P A* **** W6CHOTERM0 2A P * A 49 9 21'Expires:' A DSPATR(HI) A 49 W6TEXPIR R O 9 31REFFLD(S1RQTEXPIR *SRC) *
But when I attempt to add a 10th choice (uncommenting the CHOICE and P-field lines shown above that mention "W6CHOTERM0"), I get the CPD8186 message on field W6TERMCHC.
This puzzles me, as it would appear that this 10th choice would fit nicely under the 5th choice! Each line of 5 choices, with gutter and all, requires only 28 characters ((5 choices * 4 characters each) + (4 gutters * 2 characters each)).
BUT, when I changed the starting column of W6TERMCHC from column 7 to column 1, the DSPF compiles OK, and the window appears like this:
Has anyone seen similar behavior before, or can anyone suggest what's going on? Most users will probably have only 3 choices, and I hate to have 3 radio buttons skewed so far to the left.
I'm wondering if there isn't a bug in the DDS compiler whereby it fails to recognize that the choices are arranged on two lines and will fit in the width of the window when I start at column 7. And why does it compile when starting in column 1, even though fitting all the choices on one line would require 58 characters (2 more than the window width)?
Anyone? Anyone? Bueller?
Comment