Table of Contents

TIDEEngine.NewUnit Method

Programatically adds a new script-only file (without a form) to the current project.

Remarks

Call NewUnit to programatically add a new file to current project. The file will contain a script and will not have a form associated with it. The language of the script is specified by ALanguage parameter. If AMakeActive parameter is true, the newly created file will become the selected (active) file in the IDE, if IDE is visible. The method returns the newly created TIDEProjectFile object associated with the file.

Syntax

Unit: IDEMain

function TIDEEngine.NewUnit(ALanguage: TScriptLanguage; AMakeActive: Boolean = True): TIDEProjectFile;

Parameters

<-> Parameter Type Description
ALanguage TScriptLanguage
AMakeActive Boolean Optional: Default value is True

See also