Bug #10249
Numeric FILL-IN in ChUI Mode: Decimal Delimiter Input Discrepancies
0%
History
#2 Updated by Vladimir Tsichevski about 1 year ago
- version_reported set to 16013
- Assignee set to Vladimir Tsichevski
In OE character mode, within a FILL-IN tied to a numeric variable, when a user inputs a character corresponding to the Decimal Delimiter (either a dot (.) or comma (,), determined by the current SESSION:NUMERIC-FORMAT setting), the following actions are executed:
- If the screen includes a decimal separator, shift the caret to the position immediately following the decimal separator when one of the following conditions is satisfied:
- The caret is positioned at the decimal separator, and either:
- the variable is of type
DECIMAL, or - (*) the variable is of type
INTEGERand the mode isINSERT.
- the variable is of type
- The caret is at the rightmost integer digit, and the mode is
INSERT.
- The caret is positioned at the decimal separator, and either:
- (*) If the screen lacks a decimal separator, move the caret to the end of the screen when:
- the variable is of type
DECIMALand the mode isINSERT.
- the variable is of type
- If the caret is relocated, enforce the
OVERWRITEmode.
FWD does not accurately mirror this behavior (see points marked with (*)):
- Point 1.1.2: In FWD, the caret moves even in
OVERWRITEmode. - Point 2: In FWD, no action is performed in this scenario.
#3 Updated by Vladimir Tsichevski 6 months ago
I compiled this Input Decimal Delimiter specification:
This describes the behavior of the OpenEdge FILL-IN widget when the user enters the decimal delimiter character (. in AMERICAN locale, , in EUROPEAN locale).
The actions depend on several contextual conditions listed below.
Conditions¶
UI Mode¶
- gui: Graphical User Interface mode
- character: Character User Interface mode
Format Type¶
- format-with-decimal: The widget format includes an explicit decimal point (e.g.,
>>,>>9.99) - format-without-decimal: The widget format does not include a decimal point (e.g.,
>>,>>9)
Variable Type¶
- decimal-var: The
FILL-INis bound to aDECIMALvariable - integer-var: The
FILL-INis bound to anINTEGERvariable
Widget Alignment¶
- left-aligned: The
FILL-INwidget is left-aligned - right-aligned: The
FILL-INwidget is right-aligned
Insert Mode¶
- insert-on: Insert mode is active
- overwrite: Overwrite mode is active
Widget State¶
- unknown-value: The current value is unknown (screen displays
?or blank) - valid-number: The current value is a valid number matching the format
Caret Position¶
- at-delimiter: The caret is positioned directly on the decimal delimiter
- at-least-significant-integer-digit: The caret is positioned exactly on the least significant integer digit of the format
bc.. .. note::
TODO: investigate cases where there is no integer part in the format (e.g., .99).
- any-position: The caret position is irrelevant for the rule
Actions Performed¶
- zero-screen: Replace the screen value with a formatted zero (e.g.,
"0.00"or"0"). The exact presentation is defined by the format and is not described here. - move-after-delimiter: Move the caret immediately after the decimal delimiter
- move-to-end: Move the caret to the position after the rightmost character
- clear-contents: Clear the editor contents completely
- enable-insert: Turn insert mode on
- no-action: No visible change occurs
Behavior Rules¶
Unknown Value State¶
Screen value is unknown (? or blank).
GUI mode (any alignment)¶
decimal-var
- zero-screen
- If format-with-decimal: move-after-delimiter
- Else: move-to-end
integer-var
- If format-with-decimal:
- zero-screen
- move-after-delimiter
- If format-without-decimal:
- clear-contents
CHARACTER mode (any alignment)¶
decimal-var
- zero-screen
- If format-with-decimal: move-after-delimiter
- Else: move-to-end
integer-var
- If format-with-decimal:
- zero-screen
- move-after-delimiter
- If format-without-decimal:
- enable-insert
Valid Number State¶
GUI mode (any alignment)¶
decimal-var
- If format-with-decimal: move-after-delimiter
- Else: move-to-end
integer-var
- If format-with-decimal: move-after-delimiter
- Else: no-action
CHARACTER mode¶
decimal-var, left-aligned
- If format-with-decimal:
- at-delimiter: move-after-delimiter
- at-least-significant-integer-digit:
- insert-on: move-after-delimiter
- overwrite: no-action
- If format-without-decimal, any-position:
- insert-on: move-to-end
- overwrite: no-action
integer-var, left-aligned
- If format-with-decimal:
- at-delimiter:
- insert-on: move-after-delimiter
- overwrite: no-action
- at-least-significant-integer-digit:
- insert-on: move-after-delimiter
- overwrite: no-action
- at-delimiter:
- If format-without-decimal, any-position: no-action
decimal-var, right-aligned
- If format-with-decimal:
- at-delimiter: move-after-delimiter
- at-least-significant-integer-digit:
- insert-on: move-after-delimiter
- overwrite: no-action
- If format-without-decimal, any-position:
- insert-on: move-to-end
- overwrite: no-action
integer-var, right-aligned
- If format-with-decimal:
- at-delimiter:
- insert-on: move-after-delimiter
- overwrite: no-action
- at-least-significant-integer-digit:
- insert-on: move-after-delimiter
- overwrite: no-action
- at-delimiter:
- If format-without-decimal, any-position: no-action