sfm_datap()

Assigns all underlying data variables on a Designer data form

Call
#include <vv_des.h>
void sfm_datap(dstructp, dfmp)

PTR dstructp

Pointer to the data structure which will hold data collected on form

DFORMPTR dfmp Pointer to form to assign data variables to
dstructp: Specify a pointer to a data structure of the type created for this form from within the Designer. The data structure created by the Designer has a member for each data field, memo field, and scrollable region. The member for any scrollable region points to another structure containing members for each field on that scrollable region. Any (1) field or memo that has the option OMITFROMSTRUCT turned ON or (2) any scrollable region that is set to have its data structure omitted does not have a member included in the data structures created by the Designer. Radio button fields will have one entry per "group"; all data variables for a radio button point to the same data variable.
Returns

None

Description

sfm_datap() goes though the linked list of items on the form, assigning a member of the passed data structure as the underlying data variable for the item. If the OMITFROMSTRUCT option is ON for any individual data field or memo field, a data variable is not assigned to the field.

If the item is a scrollable region and its structure was not set to be omitted from the form structure, each field defined in the scrollable region is assigned a member of the data structure for the scrollable region pointed to in the form data structure.

Related Functions

dl_fmget(), sf_datap(), ssr_datap()

Cautions

All underlying data variables must be assigned before the form is processed, except those that have OMITFROMSTRUCT turned ON in the Designer. Use sf_datap() to assign underlying data variables to individual fields.

If a scrollable region has been omitted from the form structure it MUST have its field data pointers resolved with a call to ssr_datap().

The data structure passed is generated by the Designer and is based on field order, field types, and the size of the underlying data. Therefore, if fields are added or deleted or their order, type or size is changed, you must generate a new data structure header file and recompile any modules that reference that header.


Home Contents Previous Next