I noticed that every time I edit/run/save a project with the Scripter IDE, it changes the Name property of my Main Form. Originally my form is named fmMain. After 1st storing and reopen its named into fmMain_2. The next time fmMain_3_2. And after 11 stores its named fmMain_3_2_4_2_2_2_5_2_3_3_1.
Also the sfm is affected
object fmMain_3_2_4_2_2_2_5_2_3_3: TScriptForm
Caption = 'fmMain'
ClientHeight = 439
ClientWidth = 651
Color = clBtnFace
.....
end
But the Main Unit still correctly works with:
uses
Classes, Graphics, Controls, Forms, Dialogs, uMain;
var
MainForm: TfmMain;
begin
MainForm := TfmMain.Create(Application);
MainForm.Show;
end;
...because all works no big problem ;) I am Just curious from where this renaming is triggered?
I renamed my Form in the scripter and the first few stores it looks like it hold the Form Name. But after a while and a few saves in the Scripter IDE the renaming of the Form starting again. :(
Yes I can reproduce. But sadly with no simple Demo I can send.
But I remembered that Delphi do this "_" renaming also by creating Dynamic Forms muliple times. When you make a Applikation in which you create a form dynamic multiple times (like the Delphi MDI Demo does) and then you check the Screen.Forms List and watch the Screen.Forms[x].Name Property of all the forms in your Application, then you'll see that the multiple created Forms are also called MyFormName_1, MyFormName_2 and so on.
Well, yes, it's some automatic renaming made by Delphi when instantiating forms I guess. But we were not able to reproduce it. It must be some specific situation and/or sequence of steps that cause this.