Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : Set( ) method (Reflect)
 

Set( ) method (Reflect)

Sets the value of the data member or property. This method can only be used to set the value of a public data member or property; otherwise, this method will raise an error.
Return type: VOID
Access: PUBLIC
Applies to: Progress.Reflect.Variable class

Syntax

Set ( INPUT value AS data-type )

Set ( INPUT index AS INTEGER,
INPUT value AS data-type )

Set ( INPUT instance AS Progress.Lang.Object,
INPUT value AS data-type )

Set ( INPUT instance AS Progress.Lang.Object,
INPUT index AS INTEGER,
INPUT value AS data-type )
data-type
The Progress data type of the value being set. The method will raise an error if the value supplied is not type compatible with the data type of the data member or property.
index
For a data member or property that is an array, the index indicates which element to set. If one of the overloads containing this parameter is invoked for a data member or property that is not an array, the method will raise an error.
instance
An instance of the class that contains the data member or property. This instance must be of the type specified by either the DeclaringClass or OriginatingClass property of the Progress.Reflect.Variable instance. Using the instance parameter with a static data member or property will raise an error.
value
The value to set. If the class data member or property being set is an array and you are not setting an individual element of that array, this value will be copied to every element of the array.

Notes

*When applied to a property, the method will invoke the property's SET method, if there is one.
*Use the Set(value) and Set(index, value) overloads to set the value of static data members, and use the Set(instance, value) and Set(instance, index, value) overloads for instance data members. Calling an overload on a data member of the incorrect scope will raise an error.
*The Set(index) and Set(instance, index) overloads cannot be used to set individual elements in a .NET array.