Units from different path are not available for auto-create forms
Original Reporter info from Mantis: MAndreato @mandreato
-
Reporter name:
Original Reporter info from Mantis: MAndreato @mandreato
- Reporter name:
Description:
In the project options, Forms, the Available forms listing misses the ones saved in path different from the project's path.
Steps to reproduce:
Create a new Application project and save all as follow (choose a different path if needed):
--> c:\temp1\project1.lpi
--> c:\temp1\unit1.pas
Close all, even the project, then create a new Application project and save all as follow (another path, different from the previous):
--> c:\temp2\project1.lpi
--> c:\temp2\unit1.pas
Remaining in the second project, create a new Data Module (or a Form), then close all, even the project, saving unit2 into the second folder.
Now reopen the project1 saved in the first folder: "c:\temp1\project1.lpi".
In the Project Inspector, files, add files from file system, choosing the Data Module (or Form) unit saved into the second folder: "c:\temp2\unit2.pas"; it will ask for adding the folder into the search path: ok.
In the project options navigate to "Forms" (https://wiki.lazarus.freepascal.org/IDE_Window:__Project_Options#Forms) but the Data Module (or Form) is not listed as available form to add to auto-create forms.
You have to manually change c:\temp1\project1.lpr and add "Application.CreateForm(TDataModule1, DataModule1);" to make it automatically create on start.