Widget-based transfers
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Widget-based transfers
The techniques for implementing widget-based multiple-item transfers are very similar to those used for single-item transfers (see Single-item data transfers). The basic difference is in the order of operations and the extra steps to provide widget selection and confirmation before the selected operation proceeds to completion. You might implement a widget-based data transfer according to the following processing model:
- The user chooses the Cut, Copy, or Paste option from a multiple-item transfer menu.
- On the
CHOOSEevent for the chosen transfer option, the procedure enables all eligible widgets for selection (SELECTABLEattribute =TRUE) and makes all other nonparticipating widgets insensitive (SENSITIVEattribute =FALSE). - The user can now only select widgets for the selected data transfer option and confirm the selection.
- When the user is finished selecting widgets, they invoke an option (for example, a button or menu item) that confirms and allows the operation to proceed to completion. (The user might also invoke an option to cancel the current operation and return to other application functions.)
- On confirmation of widget selection, the procedure:
- Sets
the appropriate
CLIPBOARDhandle attributes for the selected operation. This requires setting theMULTIPLEattribute toTRUE, and for Cut or Copy operations (write transfers) setting theITEMS-PER-ROWattribute to format the data into lines of tab-separated items. - Iterates through the widget list assigning each selected widget's
SCREEN-VALUEattribute to theCLIPBOARDhandleVALUEattribute for a Cut/Copy operation, or assigning theVALUEattribute to eachSCREEN-VALUEattribute for a Paste operation. (You can implement the iteration through the widget list using either theNEXT/PREVIOUS-SIBLINGorNEXT/PREVIOUS-TAB-ITEMattribute to return and save the handle of each succeeding widget in the list.) - Completes the operation by setting the
MULTIPLEattribute toFALSEand disabling selection and enabling sensitivity for all widgets (SELECTABLE = FALSEandSENSITIVE = TRUE).
- Sets
the appropriate
- The user can now perform other application functions.
In this implementation, the essential tasks in the multiple-item transfer are included in Item 5. Of course, there are many variations of this process that you can implement, such as providing preselected widget lists from which the user can choose (eliminating the need for the selection mode enabled in Item 2). This latter approach can employ a processing model similar to that used for data-based transfers.