Project

General

Profile

Bug #10249

Numeric FILL-IN in ChUI Mode: Decimal Delimiter Input Discrepancies

Added by Vladimir Tsichevski about 1 year ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
Vladimir Tsichevski
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
16013
version_resolved:
reviewer:
production:
No
env_name:
topics:

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:

  1. 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:
    1. The caret is positioned at the decimal separator, and either:
      1. the variable is of type DECIMAL, or
      2. (*) the variable is of type INTEGER and the mode is INSERT.
    2. The caret is at the rightmost integer digit, and the mode is INSERT.
  2. (*) If the screen lacks a decimal separator, move the caret to the end of the screen when:
    1. the variable is of type DECIMAL and the mode is INSERT.
  3. If the caret is relocated, enforce the OVERWRITE mode.

FWD does not accurately mirror this behavior (see points marked with (*)):

  1. Point 1.1.2: In FWD, the caret moves even in OVERWRITE mode.
  2. 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-IN is bound to a DECIMAL variable
  • integer-var: The FILL-IN is bound to an INTEGER variable

Widget Alignment

  • left-aligned: The FILL-IN widget is left-aligned
  • right-aligned: The FILL-IN widget 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
  • 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
  • If format-without-decimal, any-position: no-action

Also available in: Atom PDF