Project

General

Profile

Feature #12032

implement the ITERATION-CHANGED event

Added by Greg Shah about 1 month ago. Updated about 1 month ago.

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 Keyboard event name table, so Keyboard.eventCode() returns -1.
  • EventList.eventCode returns 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

  1. Establish on OpenEdge exactly when ITERATION-CHANGED fires 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, REFRESH and INSERT-ROW;
    • on single- and multiple-selection browses, and on an empty browse;
    • its order relative to VALUE-CHANGED, ROW-ENTRY, ROW-LEAVE and ROW-DISPLAY, and whether both fire for the same change.
  2. Add the event to the event tables so that ON ITERATION-CHANGED registers a trigger and APPLY "ITERATION-CHANGED" runs it.
  3. Fire it from the browse at the points established above. Do not simply alias it to VALUE-CHANGED unless OpenEdge shows the two are identical in every case.
  4. Check that it works for static and dynamic browses, and for a trigger defined with PERSISTENT RUN.
  5. 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.

Also available in: Atom PDF