Bug #5245
BrowseColumnWidget.getScreenValue(): incorrect handling of an unknown value
0%
History
#1 Updated by Vladimir Tsichevski about 3 years ago
The BrowseColumnWidget.getScreenValue()
convert an unknown character value to an empty string.
This code:
DEF TEMP-TABLE tt FIELD f1 AS CHARACTER FORMAT "x(32)". CREATE tt. OPEN QUERY q FOR EACH tt. DEFINE BROWSE brws QUERY q DISPLAY tt.f1 ENABLE ALL WITH TITLE "Browse" SIZE 70 BY 7. DEF FRAME fr brws WITH TITLE "Frame" SIZE 70 BY 15 NO-LABELS. ENABLE ALL WITH FRAME fr. brws:SELECT-ROW(1). tt.f1:SCREEN-VALUE IN BROWSE brws = ?. MESSAGE f1:SCREEN-VALUE IN BROWSE brws. WAIT-FOR CLOSE OF THIS-PROCEDURE.
Displays '?' in OE, and '' in FWD.
The method defined as:
public character getScreenValue() { character val = super.getScreenValue(); if (val.isUnknown() && !config().inEditMode) { val = new character(""); } return val; }
#2 Updated by Greg Shah about 3 years ago
- Assignee set to Stanislav Lomany
#3 Updated by Stanislav Lomany about 3 years ago
- Status changed from New to WIP
Sergey, if you remember the specific case why this was added in BrowseColumnWidget
, please let me know. I get "?" in this case.
public character getScreenValue() { character val = super.getScreenValue(); if (val.isUnknown() && !config().inEditMode) <--- { <--- val = new character(""); <--- } <--- return val; }
#4 Updated by Sergey Ivanovskiy about 3 years ago
It seems that it was related to the customer's project testcases 1 and 2, when all data after successful input are cleared. It needs to find the corresponding task number from the customer's project.
#5 Updated by Sergey Ivanovskiy about 3 years ago
I found the similar thread #3911-51 and below. #3911-27
#6 Updated by Stanislav Lomany about 3 years ago
Sergey, do you have the customer's app from #3911 available on your machine? Unfortunately the latest version of it is broken and I cannot test the scenarios from #3911.
I need to commit the fix, but it turns out that I cannot test it for regressions. Any ideas are welcome.
#7 Updated by Sergey Ivanovskiy about 3 years ago
Stanislav, I don't have a standalone testcase for this #3911 issue. The previous version of this application didn't start with the current 3821c.
#8 Updated by Stanislav Lomany about 3 years ago
- File col-screen-val-ed.p added
- File col-screen-val.p added
- Status changed from WIP to Review
Fixed in 3821c rev 12327.
#9 Updated by Stanislav Lomany about 3 years ago
For future reference: there's a chance that this fix may regress the customer's scenarios from #3911.