PropRef [v2.1-alpha.10+]

Creates a virtual reference to a property of an object.

Ref := PropRef(Obj, Name , Args*)

PropRef itself is a class derived from Any.

Parameters

Obj

Type: Object or ComValue

Any object.

Name

Type: String

The property's name.

Args

Zero or more arguments for an indexed property. For example, a reference to Obj.Prop[A, B] can be represented by PropRef(Obj, "Prop", A, B).

Return Value

Type: PropRef

This function returns a virtual reference corresponding to the property; that is, an object with a __Value property which retrieves or sets the value of the target property. This can be passed to a ByRef parameter.

Properties

PropertyDescription
TargetThe object containing the referenced property.
NameThe referenced property name. An item reference uses __Item.
ArgsAn Array containing the indexed-property arguments, or an empty Array for a non-indexed property.

These properties are read-only.

Remarks

In most cases, directly using this class is not recommended. Instead, use the reference operator to retrieve a reference to a property (via the __Ref method).

However, this function can also be used with ComValue and derived types, or to bypass any custom __Ref implementation.