[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Copies property from the class instance to the specified persistent object.
Source position: actnlist.pas line 176
protected procedure TCustomAction.AssignTo( |
Dest: TPersistent |
); override; |
Dest |
|
Persistent object where property values are stored. |
AssignTo is the generic function to assign the class' contents to another class. This method must be overridden by descendent classes to actually assign the content of the source instance to the destination instance.
The TPersistent implementation of Assignto raises an EConvertError exception. This is done for the following reason: If the source class doesn't know how to assign itself to the destination class (using AssignTo), the destination class may know how get the data from the source class (using Assign). If all descendent methods are implemented correctly, then if neither of the two classes knows how to assign their contents to each other, execution will end up at TPersistent.Assign, which will simply execute.
Dest.AssignTo(Self);
If neither of the classes knows how to assign to/from each other, then execution will end up at the TPersistent implementation of AssignTo, and an exception will be raised.
Raises an EConvertError exception if the current class cannot be assigned to the persistent class instance in Dest.
Version 4.0 | Generated 2025-05-03 | Home |