Project

General

Profile

Bug #6130

Implement editing for overridden browse fields

Added by Stanislav Lomany about 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/02/2022
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

Related issues

Related to User Interface - Bug #2596: Implement missing browse quirks. New 06/26/2015

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.

Also available in: Atom PDF