Please enable JavaScript to view this site.

A-Shell Consolidated Reference

cmdflg may be set to one or more of the following flags.

Symbol

Value

Description

INFCF_CMDFIL

1

Enable command file input. This flag causes INFLD to attempt to read from a command file. If no characters are available, it will then accept input from the keyboard. Command file input can be turned on and off on a field-by-field basis. Note that you can override cmdflg (force it on) using the type code p.

INFCF_DROPDOWN

2

(GUI only) Force drop-down display. This flag applies only when INFLD is used in GUI mode (see type |G) and the field is implemented using a control type that has a drop-down option (e.g. date picker, combo box). In such a case, the drop-down display will be triggered automatically at the start of the field editing operation (as if the user had clicked on the drop-down button).

Note that this usage is often appropriate when the field is being called in response to a mouse click. One way to detect that within a centralized INFLD wrapper routine would be to check if the incoming value of exitcode matches the value associated with the current field (as defined in the hlpidx parameter).

INFCF_EXISTING

4

(GUI only) Set initial value based on existing control. This flag applies only to checkboxes, in which case it causes the initial field value to be loaded from the current state of the existing checkbox (assuming there is an existing checkbox control at the specified coordinates) rather than the entry parameter. This helps deal with the fact that clicking on a checkbox (even when it is not currently under the control of INFLD) may toggle the value of the checkbox (in addition to sending the keyboard string associated with the field). If your app responded to the resulting exitcode by calling INFLD to edit the clicked-on checkbox, the app's copy of the checkbox's value (stored from the previous time it was edited with INFLD) may be out of sync with the new actual state of the checkbox, in which case it would appear to the user that it sometimes takes two clicks to get the checkbox to change value.

This is equivalent to setting type ||b.

INFCF_DISABLE

8

Disable the control. Use of this flag causes the field to be set to the disabled state. This is mainly useful in GUI mode with opcode 2 (display) to display a field value but indicate to the user (by the fact that it is in dim gray) that it is not presently applicable (and cannot be edited). Since you cannot edit a disabled field, attempting to use this flag with opcode 0 or 1 will cause it to act just like opcode 2, except that any incoming positive exitcode value is preserved (instead of being reset to 0 as would normally be the case with a display operation). This should help your existing field navigation logic to jump over disabled when moving backwards through them.

Note that a normal field display operation (i.e. opcode 2 and cmdflg not containing INFCF_DISABLE) will cause a previously disabled field to be re-enabled. Thus it might be necessary for your program to maintain a separate copy of the cmdflg parameter for every field that might be disabled, in order to preserve its state.