TIDEProjectFile.ChangeFileName Method
Changes the file name of this project file, updating the script unit name and notifying dependent scripts if requested.
Remarks
Changes the file name of this project file. This method must be used when the name of the file is changed, for example, in a "Save As" operation. Changing the file name involves several other things, like updating the script's UnitName property, notify other scripts that use the current script, among other tasks. If NotifyUnitChange is true, then the main script is notified about the file name change, and will update its "uses" clause accordingly. For example, if the main script contains clause "uses Unit1;", and we change Unit1 file name to MyUnit, if NotifyUnitChange is true than the main script will be updated to "uses MyUnit;"
Syntax
Unit: IDEMain
procedure TIDEProjectFile.ChangeFileName(AFileName: string; NotifyUnitChange: Boolean = False);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| AFileName | string | ||
| NotifyUnitChange | Boolean | Optional: Default value is False |