User Tools

Site Tools


restorefield_restore_field_to_last_saved_value_.htm
Navigation:  ABC Library Reference > WindowManager > WindowManager Methods >====== RestoreField (restore field to last saved value) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

RestoreField( control ), VIRTUAL

blk2blue.jpg

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

restorefield_restore_field_to_last_saved_value_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1