Christian Bugge
2007-11-16 14:37:25 UTC
Hi
I'm using the IOTAProjectCreator as in the example
from here: http://www.gexperts.org/opentools/ with Delphi 2007.
Now I like to give a Project name and directory automatically.
I do the following:
ProjectModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TProjectCreatorModule.Create);
ProjectModule.FileName := 'P:\Newdir\Test\Test1.dproj';
// Now create a Form for the Project since the code added to the Project
expects it.
FormModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TFormCreatorModule.Create);
FormModule.FileName := 'P:\Newdir\Test\Unit1.pas';
FormModule.Save(False,True);
// Now create a DataModue for the Project since the code added to the
Project expects it.
DataModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TDataModuleCreatorModule.Create);
DataModule.FileName := 'P:\Newdir\Test\DataModul1.pas';
DataModule.Save(False,True);
ProjectModule.Save(False,True);
This works but opening the Unit1 and datamodul1 gives me an error. You see
the directory tree under the project.
If I close delphi and open it again the project and units are fine. So I'm
not far away from a solution.
Greetings from switzerland
Christian Bugge
I'm using the IOTAProjectCreator as in the example
from here: http://www.gexperts.org/opentools/ with Delphi 2007.
Now I like to give a Project name and directory automatically.
I do the following:
ProjectModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TProjectCreatorModule.Create);
ProjectModule.FileName := 'P:\Newdir\Test\Test1.dproj';
// Now create a Form for the Project since the code added to the Project
expects it.
FormModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TFormCreatorModule.Create);
FormModule.FileName := 'P:\Newdir\Test\Unit1.pas';
FormModule.Save(False,True);
// Now create a DataModue for the Project since the code added to the
Project expects it.
DataModule := (BorlandIDEServices as
IOTAModuleServices).CreateModule(TDataModuleCreatorModule.Create);
DataModule.FileName := 'P:\Newdir\Test\DataModul1.pas';
DataModule.Save(False,True);
ProjectModule.Save(False,True);
This works but opening the Unit1 and datamodul1 gives me an error. You see
the directory tree under the project.
If I close delphi and open it again the project and units are fine. So I'm
not far away from a solution.
Greetings from switzerland
Christian Bugge