Please enable JavaScript to view this site.

A-Shell Reference

Parameter func has two purposes. For type 1 (MBF_DLL), it must be a string containing the name of the function to execute within the DLL whose name was specified in cmd. For types 4 and 8 (checkboxes), it should be a B,1 variable whose value will be tied to the state of the checkbox (0=unchecked, 1=checked, 2=indeterminate). The initial value of func upon creating the checkbox will determine its initial check status. Thereafter, the value of the variable will change automatically and immediately as the checkbox is checked/unchecked.

The above technique of tying a variable directly to the checkbox state only works when the variable in memory is maintained in the same environment and context as the checkbox control. In the case of ATE, the checkbox control is on the client and the variable is on the server, so the link only works to establish the initial value of the control. After that, it is harmlessly broken, requiring you to query the checkbox value using opcode CTLOP_QRYCB.

A particular situation to avoid is creating a checkbox within an SBX, using a B,1 variable for the func parameter. When the SBX exits, the checkbox control will remain linked to the variable's address, even though that memory will have been relinquished by the SBX. To avoid this, just specify a null string ("") for the func parameter when creating a checkbox, and use CTLOP_QRYCB to query it.

Checkboxes can also be created and managed by INFLD, in which case it handles the details just described internally and interfaces with the application as if the checkbox were a Yes/No field.