[scope] TYPE type-name IS ENUM ALIAS classname
where classname is the .NET class name enumeration-values
[scope] TYPE type-name IS RECORD ALIAS classname
where classname is the .NET class name
type-name field-name alias "fieldname"
where fieldname is the .NET class property name; fieldname must be in quotation marks
where field-name matches exactly the .NET class property name
If you are using Record Class against .NET WinForms controls, you may be able to extend the list of properties and methods that are declared in the resulting winclass declaration.
Property and method declaration is directly related to whether or not there is a 4Test compatible data type for the property type or for a method's parameter type(s). By declaring new 4Test data types that are aliased from types used in the .NET WinForms application, you can extend the list of 4Test compatible data types. Specifically, enumeration types and record types declared in the .NET WinForms application are candidates for aliasing. See Rules for details.
type MyClientSize is record alias "System.Drawing.Size" INTEGER myWidth alias "Width" // or, alternatively, INTEGER Width INTEGER myHeight alias "Height" // or, alternatively, INTEGER Height
Regardless of the property type or the method parameter types and any aliasing you may introduce, STATIC member properties and methods will be EXCLUDED from the winclass declaration generated by Record Class.
When declaring a new 4Test data type using the alias keyword, your choice for type-name does not have to match the name of the type in the .NET WinForms application.
If you are declaring a record data type, you can either have the field names match exactly with the corresponding field names in the .NET WinForms application, or you can use the alias keyword to define your own field names; in this case, the string used within the "" must match exactly (including capitalization) with the corresponding field names in the .NET WinForms application.
If you are declaring an enum data type, the enumeration values must match exactly with the enumeration values in the .NET WinForms application; you do not have the choice of using your own enumeration values and the alias keyword.
The .NET class must use a public constructor (in the example above, System.Drawing.Size)
The .NET class must be inherited from the .NET ValueType.