version 2004.1
AP Get templates (templateNameArray)
Parameter | Type | Description | |
templateNameArray | String Array | Array of template names |
Description
The AP Get templates command populates the array templateNameArray with the list of the form templates available in the current 4D application.
The form templates can be selected in the Form Wizard dialog box. Available built-in templates are for example Nostalgia, OSX, OSX (no labels), Philadelphia, etc. Customized forms built in the Advanced pages of the Form Wizard can be added as templates.
This command is useful when you use the AP Add table and fields command, because you can determine the template to use for the default forms.
Note: This command does not work when it is executed from an application that has been compiled and merged 4D Desktop.
If the command has been executed properly, it returns 0. Otherwise, it returns an error code.
Example
This example creates a window containing all the available templates:
$ref:=Open window(<>WLeft;<>WTop;450;400;8;"Template List") ARRAY STRING(255;ArrTemplates;0) $error:=AP Get templates (ArrTemplates) DIALOG([Table 1];"ArrTemplates") CLOSE WINDOW($ref)