Navigation: ABC Library Reference > WindowManager > WindowManager Methods >====== RestoreField (restore field to last saved value) ====== | |
RestoreField( control ), VIRTUAL
RestoreField | Restores the contents of the specified control. |
control | An integer constant, variable, EQUATE, or expression containing the control number of the control whose contents to restore. This is the field equate number of the control. |
The RestoreField method restores the contents of the specified control to the value it contained when the record was last saved. The RestoreField only works if the HistoryKey property is set.
Implementation:
The AddHistoryFile method names the file and record buffers from which fields are saved and restored. The AddHistoryField method associates specific fields from the history file with their corresponding WINDOW controls. The SaveHistory method saves a copy of the history fields. The RestoreField method restores the contents of a specific control.
Example:
WindowManager.TakeAccepted PROCEDURE
A SIGNED,AUTO
CODE
A = ACCEPTED()
IF ~SELF.Toolbar &= NULL
SELF.Toolbar.TakeEvent(SELF.VCRRequest,SELF)
IF A = Toolbar:History
SELF.RestoreField(FOCUS())
END
END
!procedure code
See Also: AddHistoryField, AddHistoryFile, HistoryKey, SaveHistory