System.Classes.TRecall

From RAD Studio API Documentation
Jump to: navigation, search

System.TObjectTRecall

Delphi

TRecall = class(TObject)

C++

class PASCALIMPLEMENTATION TRecall : public System::TObject

Properties

Type Visibility Source Unit Parent
class public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

TRecall stores the properties of a persistent object so that they can be restored at a later time.

TRecall acts as a temporary repository for the properties of a persistent object. To use TRecall

1. Create an instance of TRecall, assigning an object to use for storing property values (the storage object), and an object whose property values it represents (the reference object). When you create an instance of TRecall, it automatically stores the current properties of the reference object.

2. Call the Store method at any time to take a snapshot of the reference object's properties. TRecall updates the storage object so that it reflects only the property settings from the last time you called the Store method (or, if Store was never called, from the point when the TRecall object was created).

3. Delete the TRecall object to restore the reference object to the set of properties it had when you last called the Store method.

If you do not want the TRecall object to restore the properties it is saving, call the Forget method. After you call Forget, the TRecall object can't be used. It does not update the reference object when destroyed and can't save any more properties.

You can use TRecall to save the properties of any persistent object, using any explicitly specified storage object. In addition, TRecall has several descendants with their own built-in storage objects that work only with a specific class of reference object. These include TFontRecall, TPenRecall, and TBrushRecall.

See Also