The <def_field> Option

 

<def_field> is the name of a global integer variable that stores a "default" field number. Field "numbers" begin at zero and are ordered according to their sequence in the template.

 

When <def_field> is defined, it is assumed that there are 2-4 fields following the "trigger" field. These fields are taken as a mutually- exclusive set of fields (i.e. options) -- that is, only one of them may be used to gather input for a given form instance. When the "trigger" field is accepted, the labels of the fields following the "trigger" field are shown on the command option buttons at the bottom of the GUI.

 

The field identified by the global integer variable named <def_field> is then activated. The user may enter data for this field, or he may select one of the other fields displayed on the command option buttons. When any of these fields is accepted, the entire form is accepted and the function associated with the form is invoked.

 

The number of whichever field is accepted is assigned to the global integer named <def_field>, thus becoming the new default field within the "mutually-exclusive" set of fields.

 

If there were three fields in the "mutually-exclusive" set of fields, the function executed by the corresponding form would query each of the fields to see which one has data (i.e. only one of them should have data). The function would then proceed based on the "class" of the field with data.

Return to VX CAD/CAM Index