The PTYROUTINE command is used create a routine to manipulate the value of a user-defined property.
When you define a property for a form using the DEFINE_PTY command, you can use the PTYROUTINE command to specify routines for setting the value of the property and for returning its value. You do this when you want to manipulate the value of the property. For instance you can:
The input and output values for a property routine are defined using the DEFINE_MAP command. For more information refer to the description of 7.33 DEFINE_MAP.
It is worth noting that the custom-defined properties (DEFINE_PTY) and the property routines are all contained inside the form. As a result the form can receive property values from its owner forms as well as return them, but the way this value is handled inside the form is not visible to the owner forms. As a consequence, you can change the way the form handles the property value without having to make any change to forms that use this property.
For instance, a form which has an Address property could be changed so that post code and state information which was previously handled as one field would now be handled as two fields. As a result the property routine in the form would have to be changed, but no change would be required in other forms that set or retrieve the value of the Address property because the property itself does not change.
The name of a PTYROUTINE can be the value of the SET or GET parameters in a DEFINE_PTY command. See the description of 7.34 DEFINE_PTY.
PTYROUTINE ---- NAME -------Routine Name -------|