Conversion of BOOLEAN Values

This functionality is supported only if you are using the Classic Agent.

In some cases, when you record a class declaration, the result is a method prototype that takes a SHORT data type as a parameter even though the associated Visual Basic property takes a BOOLEAN parameter.

For example, in the following Visual Basic prototype, the syntax of the TabEnabled property of the SSTab class is:

object.TabEnabled (tab) [= boolean]

where boolean, the return value, is a BOOLEAN value: TRUE for enabled, FALSE for disabled. The prototype for its method equivalent in the SSTab class is shown in vbclass.inc as:

ole VOID SetTabEnabled (SHORT Index, SHORT Arg1)
Note: The SetTabEnabled method takes a value of type SHORT as its second argument, which is equivalent to the BOOLEAN argument of the property. However, because 4Test and ActiveX define the BOOLEAN type differently, attempting to pass TRUE or FALSE as you would in Visual Basic will generate an argument type mismatch error in Silk Test Classic. Use the following constant values instead, which are defined in oleclass.inc:
  • OLE_TRUE (which equals –1)
  • OLE_FALSE (which equals 0)