SIMPOL Documentation

!setproperty()

Prototype

!setproperty ( type(*) object, property property, type(*) value )

Return value

.nul

Description

Sets the value of a property of an object, using the property object for the type, and the object itself. This can be useful if you are working with an unknown object, and wish to assign a value to one of its properties. Using the type object the properties can be retrieved and now with this function the values of those properties can be assigned. Without this function, the name of the property must be known at compile time in order to assign a property's value. This is also the only way that a property that has been marked readonly can be set. In such a case, the read only property must be set in a member function of the type and it can only be set using this system function.

Parameters

ParameterDefault valueType nameDescription
object.nultype(*) The object that contains the property for which the value is to be assigned.
property.nulproperty The property object for the property whose value is to be assigned.
value.nultype(*) The value that is to be assigned to the property. In the case of reference properties, this should be an object.