RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInvokeableVariantType.SetProperty Method

Sets the value for any property this Variant type supports.

Pascal
function SetProperty(const V: TVarData; const Name: string; const Value: TVarData): Boolean; virtual;
C++
virtual __fastcall Boolean SetProperty(const TVarData V, const AnsiString Name, const TVarData Value);

Override SetProperty to provide the write implementation for the properties of instances of the invokeable Variant type. When the application writes to a Variant property (Delphi) or calls the Variant's Exec method (C++) a call is automatically generated to SetProperty that allows the TInvokeableVariant descendant to implement the call. 

Name is the name of the property. 

Value is a TVarData record that contains the new property value. 

GetProperty returns true if it sets a property value, false if it does not implement the specified property or if the specified property is read-only. 

As implemented in TInvokeableVariant, GetProperty always returns false, because it does not implement any properties. 

 

DoFunction 

DoProcedure 

GetProperty 

Exec 

Supporting Properties and Methods in Custom Variants

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!