Navigation: Templates > Template Language Reference > Introduction >====== Template Prompts ====== | |
Input Validation Statements and Prompt Entry types place controls on the Procedure Properties window or Actions dialog which the developer sees when using the template to design an application. These range from a simple string telling the Developer what to do (#DISPLAY), to command buttons, check boxes, or radio buttons. There are also specialized entry types which provide the programmer a list of choices for input, such as the data fields in the dictionary.
Standard Windows controls can be used to get information from the programmer on the Procedure Properties window, the Actions dialog, or custom prompt dialogs. The common control types entry field, check box, radio button, and drop-down list are all directly supported via the #PROMPT statement.
#PROMPT places the prompt, the input control, and the symbol in a single statement. The general format is the #PROMPT keyword, the string to display the actual prompt, a variable type for the symbol, then the symbol or variable name. The Application Generator places the prompt and the control in the Procedure Properties or Actions dialog (depending on whether the prompt comes from a procedure template or a code, control, or extension template). When the developer fills the control with a value, then closes the dialog, the symbol holds the value.
The #BUTTON statement provides additional “space” for developer input when there is more developer input required than can fit in the one dialog. This places a button in the dialog, which displays an additional custom dialog when pressed. The additional dialogs are called “prompt pages.”
#ENABLE allows prompts to be conditionally enabled based on the programmer's response to some other prompt. #BOXED supports logical grouping of related prompts. Once the programmer has input data into a prompt, the #VALIDATE statement allows the template to check its validity.
These tools provide a wide range of flexibility in the type of information a template can ask the programmer to provide. They also provide multiple ways to expedite the programmer's job, by providing “pick-lists” from which the programmer may choose wherever appropriate.