Bug #6130
Implement editing for overridden browse fields
0%
Related issues
History
#1 Updated by Stanislav Lomany about 2 years ago
- Related to Bug #2596: Implement missing browse quirks. added
#3 Updated by Stanislav Lomany about 2 years ago
For a browse you can specify override in DEFINE BROWSE
statement:
DEFINE BROWSE ...DISPLAY "test1" format "x(10)" @ tt.f1
or DISPLAY
statement:
DISPLAY "test2" format "x(15)" @ tt.f1 WITH BROWSE
As far as I tested, a column overridden in DEFINE BROWSE
column cannot be added to DEFINE BROWSE .. ENABLE
option or enabled later, so it cannot be edited. The only way of editing I see is to call DISPLAY .. WITH BROWSE
which overrides cell(s) in the current row.
Sample testcase:
def temp-table tt field f1 as integer. def var i as integer. repeat i = 1 to 20: create tt. tt.f1 = i. end. DEFINE QUERY q FOR tt SCROLLING. OPEN QUERY q FOR EACH tt. DEF BROWSE br QUERY q DISPLAY tt.f1 enable all WITH size-chars 65 by 10 TITLE "Static browse". DEF FRAME fr br SKIP(1) WITH TITLE "Frame" SIZE 70 BY 15 NO-LABELS . ENABLE ALL WITH FRAME fr. on "t" anywhere do: display "test" format "x(7)" @ tt.f1 with browse br. end. WAIT-FOR WINDOW-CLOSE OF DEFAULT-WINDOW.
Note that in the editable field you cannot type symbols not allowed by the base format.
Regarding saving of an overridden cell: if the result cannot be saved because of unsuitable data for the given datatype, it is ignored. Moreover, the result is saved only if we modified the overridden data. So I think these editing capabilities are not very suitable for the real-life use, and that's why we postponed implementation of this functionality.