Feature #12032
implement the ITERATION-CHANGED event
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Greg Shah about 1 month ago
Implement the ITERATION-CHANGED event¶
Project: User Interface
Problem¶
ITERATION-CHANGED is an old browse event which the 4GL still supports, and which VALUE-CHANGED replaced in the documentation. Applications written against older releases use it heavily to keep a detail pane in step with the focused row of a browse, in two forms:
ON ITERATION-CHANGED OF br_main DO: RUN refresh_detail. END. OPEN QUERY q_main FOR EACH ... APPLY "ITERATION-CHANGED" TO br_main.FWD converts both forms but does not know the event at runtime:
- It is not in the
Keyboardevent name table, soKeyboard.eventCode()returns -1. EventList.eventCodereturns null, so the trigger is never registered.LogicalTerminal.apply(handle, String)logs "Could not recognize event" and returns.- The browse never fires it.
So both the triggers and the explicit APPLY statements are silent no-ops, and every detail pane driven this way stops refreshing. The gap marking records it as Full / None.
Work¶
- Establish on OpenEdge exactly when
ITERATION-CHANGEDfires on a browse:- when the user moves the focused row with the keyboard or the mouse;
- after
OPEN QUERY,REPOSITION,SELECT-ROW,SELECT-FOCUSED-ROW,REFRESHandINSERT-ROW; - on single- and multiple-selection browses, and on an empty browse;
- its order relative to
VALUE-CHANGED,ROW-ENTRY,ROW-LEAVEandROW-DISPLAY, and whether both fire for the same change.
- Add the event to the event tables so that
ON ITERATION-CHANGEDregisters a trigger andAPPLY "ITERATION-CHANGED"runs it. - Fire it from the browse at the points established above. Do not simply alias it to
VALUE-CHANGEDunless OpenEdge shows the two are identical in every case. - Check that it works for static and dynamic browses, and for a trigger defined with
PERSISTENT RUN. - Update the gap marking.
Testcases¶
Each with an OpenEdge baseline that records which events fire, how many times and in what order:- moving through a browse with the arrow keys, page keys and the mouse;
- the programmatic operations listed above;
APPLY "ITERATION-CHANGED"to a browse with and without a trigger;- single- and multiple-selection browses.