Bug #4075
Bug #2596: Implement missing browse quirks.
Combo-box columns 4GL quirks
0%
Related issues
History
#1 Updated by Stanislav Lomany about 5 years ago
- Related to Feature #3908: implement browse column VIEW-AS COMBO-BOX added
#2 Updated by Stanislav Lomany about 5 years ago
In 4GL combo box columns are not implemented well: they have a many quirks. The list below describes the differences in how it works in 4GL and FWD.
4GL: when a combo-box cell gains focus, it displays the value which corresponds the cell value. If there is no corresponding value in combo box-list, it displays the last used combo-box value for this column. So, from a user's perspective if a cell has no corresponding value in the combo-box, a random value will be displayed. However this random value is not saved when we leave the cell. In order to save it, a user has to explicitly re-select it from the drop-down list. FWD: If there is no corresponding value in the combo box-list, an "empty" value is displayed.
In 4GL for non-character columns, when a combo cell gains focus, a random (last selected for this column) value is displayed as selected if the combo-box values have original data type. But it works correctly if the values are declared in a character form rather than original data type. I.e.
"opt 1", "01/01/01"
not
"opt 1", 01/01/01
We have the same issue for cell rendering: item values are not replaced with item descriptions if the values are declared in non-character format.
However, if we manually assign SCREEN-VALUE
to a cell in a non-row-display trigger, then comparison can be performed properly which leads to correct rendering and selection. Combo-box value is converted into a string for comparison using the export format.
It is interesting than for integer columns spaces are taken into consideration for comparison. So
tt.f1 format ">>>9" view-as combo-box LIST-ITEM-PAIRS "opt 1", "1", "opt 2", "2", "opt 3", "3" DROP-DOWN-LIST
won't properly work. It should be
tt.f1 format ">>>9" view-as combo-box LIST-ITEM-PAIRS "opt 1", " 1", "opt 2", " 2", "opt 3", " 3" DROP-DOWN-LIST
From the issues above, FWD supports the quirk that for cell rendering item values are not replaced with item descriptions if the values are declared in non-character format.
In 4GL functions that modify drop-down list, like ADD-FIRST
, ADD-LAST
and INSERT
do not work as expected: you won't get the same results as with the same functions for standalone combos. In FWD these functions are partially implemented.
#3 Updated by Greg Shah about 5 years ago
- Parent task set to #2596