ON DRAG_FINISHED block

Execution of the ON DRAG_FINISHED block notifies the dialog where the drag started and that the drop operation has been completed or terminated.

Call ui.DragDrop.getOperation() to get the final type of operation of the drop. On successful completion, the method returns "move" or "copy"; otherwise the function returns NULL. If NULL is returned, the ON DRAG_FINISHED trigger can be ignored.

In cases of successful moves to a target out of the current DISPLAY ARRAY, the application must remove the transferred data from the source model. For example, if a row was moved from dialog A to B, dialog A will get an ON DRAG_FINISHED execution after the row was dropped into B, which removes the row from the list A.

The ON DRAG_FINISHED interaction block is optional.

DEFINE dnd ui.DragDrop
...
DISPLAY ARRAY arr TO sr.* ...
  ...
  ON DRAG_START (dnd)
    LET last_dragged_row = arr_curr()
    ...
  ON DRAG_FINISHED (dnd)
    IF dnd.getOperation() == "move" THEN
      CALL DIALOG.deleteRow(last_dragged_row)
    END IF
    ...
END DISPLAY