From RAD Studio API Documentation
Jump to: navigation, search


function GetProperty(var Dest: TVarData; const V: TVarData;  const Name: string): Boolean; override;


virtual bool __fastcall GetProperty(TVarData &Dest, const TVarData &V, const System::UnicodeString Name);


Type Visibility Source Unit Parent
function public
System.TypInfo TPublishableVariantType


Returns the value of a published property on the object that GetInstance returns, so that it is available in custom Variants.

GetProperty enables an application to read the properties of instances of the publishable Variant type. It implements all the properties that are published by the object that GetInstance returns.

When the application contains a line such as

PropValue := MyVariant.SpecialProperty;

(Delphi) or calls the Exec method of the Variant (C++), a call is automatically generated to GetProperty. If SpecialProperty is a published property on the object that implements the Variant's data, GetProperty fills in the Dest parameter with the property value.

Dest is a TVarData record (Delphi) or structure (C++) that receives the property value.

V is the TVarData record or structure from the Variant instance whose property is being read.

Name is the name of the property.

GetProperty returns true if it returns a property value, and raises an exception if it does not implement the specified property.

See Also