For data forms, Vermont Views allocates edit buffers and a conversion buffer for the form. Each data field on the form has an edit buffer, which is a temporary storage space for the data that the user types into the field. The edit buffer stores the characters that the user actually typed. The edit buffer, then, is an array of characters, regardless of whether the field it is attached to is a string field or a numeric field. In order to convert data from its string representation into its numeric representation, Vermont Views needs a conversion buffer, to provide temporary storage for the converted value. There is only one conversion buffer for each data form.
For both data and menu forms, Vermont Views allocates an array of item pointers during form initialization. As you define fields on your form, they are placed into a linked list of on the form. An active item is an item into which the user can enter data, or a pushbutton or menu field that the user can select. As you define field prompts, text strings, boxes and lines, they are placed into a separate linked list of . Inserting these items into a linked list allows Vermont Views to keep track of the items, without limiting how many items you can place on a specific form. However, searching a linked list is a slow process. During form initialization, Vermont Views creates an array containing pointers to each active item on the form. This allows Vermont Views to index into an array, rather than traverse a linked list, to access the field pointers, and greatly speeds up form processing. Inactive items are left in the linked list, because Vermont Views does not need to access the inactive items frequently.
The creation of the edit buffers, conversion buffers, and item array is known as making the form ready.
Because of the fixed size of the item array, it is not possible to add items to a form once the form has been made ready. To add items to a form once it has been placed on the screen or made ready, you must first make the form unready. For more information on how to add items to a form during form processing, see Chapter 35, "Controlling Form Processing at Lower Levels."