Navigation: ABC Library Reference > EditClass > EditClass Methods >====== TakeEvent (process edit-in-place events) ====== | ![]() ![]() |
TakeEvent( event ), VIRTUAL
| TakeEvent | Processes an event for the EditClass object. |
| event | An integer constant, variable, EQUATE, or expression that contains the event number (see EVENT in the Language Reference). |
The TakeEvent method processes an event for the EditClass object and returns a value indicating the user requested action. Valid actions are none, complete or OK, cancel, next record, previous record, next field, and previous field.
Implementation:
The BrowseClass.AskRecord method calls the TakeEvent method. The TakeEvent method process an EVENT:AlertKey for the edit-in-place control and returns a value indicating the user requested action. The BrowseClass.AskRecord method carries out the user requested action.
Corresponding EQUATEs for the possible edit-in-place actions are declared in ABBROWSE.INC as follows:
EditAction ITEMIZE(0),PRE
None EQUATE ! no action
Forward EQUATE ! next field
Backward EQUATE ! previous field
Complete EQUATE ! OK
Cancel EQUATE ! cancel
Next EQUATE ! next record
Previous EQUATE ! previous record
END
Return Data Type: BYTE
Example:
EditClassAction ROUTINE
CASE SELF.EditList.Control.TakeEvent(EVENT())
OF EditAction:Forward
!handle tab forward (new field, same record)
OF EditAction:Backward
!handle tab backward (new field, same record)
OF EditAction:Next
!handle down arrow (new record, offer to save prior record)
OF EditAction:Previous
!handle up arrow (new record, offer to save prior record)
OF EditAction:Complete
!handle OK or enter key (save record)
OF EditAction:Cancel
!handle Cancel or esc key (restore record)
END
See Also: BrowseClass.AskRecord





