Save how to fix

Problem when saving to DB

procedure TdmScripter.IDEEngine1ConfirmSaveFile (Sender: TObject; IDEFileType: TIDEFileType;
  AFileName: string; AFile: TIDEProjectFile; var Action: TIDEConfirmSaveType; var Handled: Boolean);
begin
   Action: = cstSave;
   Handled: = true;
end;

procedure TdmScripter.IDEEngine1SaveFile (Sender: TObject;
  IDEFileType: TIDEFileType; AFileName, AContent: String;
  AFile: TIDEProjectFile; var Handled: Boolean);
var q: TOraQuery;
    fileName: string;
begin
   q: = TOraQuery.Create (dmScripter);
...
   Handled: = True;
end;

I launch IDEDialog1.Execute;
A new project with two units is being created.
Unit1 and unit2 with the form.

If you edit only unit2 and close the script editor, only unit2 (which was edited) is saved and the project becomes non-working.
Hello,
I think I have already asked this and Wagenr has helped me solve it.
Please check this thread: https://www.tmssoftware.com/site/forum/forum_posts.asp?TID=11189&title=how-to-save-project-loaded-in-ideengine-to-db

Regards,

Yogesh

Thank, but ...


New project and don't edit any file
dmScripter.IDEDialog1.Execute;

Close IDE

Call:
for i := 0 to dmScripter.IDEEngine1.Files.Count - 1 do dmScripter.IDEEngine1.Files.Save;

Saving nothing.

dmScripter.IDEEngine1.Files.Count is 0

When IDE is closed, all project files are closed by default. If you want to keep the project open, then use this:




  IDEDialog1.IDECloseAction := TIDECloseAction.icaNothing;

exactly what is needed:

dmScripter.IDEDialog1.IDECloseAction := TIDECloseAction.icaNothing;
dmScripter.IDEDialog1.Execute;
dmScripter.IDEEngine1.DlgSaveAll;

Thank !!