I managed to reproduce it ... I think.
In the source, go to any event handler and add an extra
end a couple lines or so before the normal end. That leaves some code dangling out there without procedure header or
begin or anything else but the
end. Then go to the object inspector and try to add another event. This is the result (in this case I added an
end just before the
OnActivate := Nil;)
procedure TMainForm.FormActivate(Sender: TObject);
{ Acts only once, on start-up}
begin
FInitRect := BoundsRect;//TRect.Create(Left, Top, Width, Height);
//AdjustWindow;
if FileList.Count > 0 then begin
AdjustScroll; {@add 20190503}
if FileList.Count = 1 then
btPlay.Click;{@add 20190430 - start playing if just one file}
end;
end; {<<<<< Extra end added here}
procedure TMainForm.FormDropFiles(Sender: TObject;
const FileNames: array of String);
begin
end;
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
end;
procedure TMainForm.ListShowHint(Sender: TObject; HintInfo: PHintInfo);
begin
end;
procedure TMainForm.ListDblClick(Sender: TObject);
begin
end;
procedure TMainForm.ListKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
end;
procedure TMainForm.btPlayClick(Sender: TObject);
begin
end;
procedure TMainForm.btNextClick(Sender: TObject);
begin
end;
procedure TMainForm.btPrevClick(Sender: TObject);
begin
end;
procedure TMainForm.btStopClick(Sender: TObject);
begin
end;
procedure TMainForm.btQuitClick(Sender: TObject);
begin
end;
procedure TMainForm.btAdjustClick(Sender: TObject);
begin
end;
procedure TMainForm.acFileBeforeExec(Sender: TObject);
begin
end;
procedure TMainForm.acFileOpenAccept(Sender: TObject);
begin
end;
procedure TMainForm.acFileSaveExecute(Sender: TObject);
begin
end;
procedure TMainForm.ProcessTerminate(Sender: TObject);
begin
end;
procedure TMainForm.FileListClick(Sender: TObject);
begin
end;
OnActivate := Nil;
end;
Those empty methods are all the methods declared
after the one which has the error, and they are repeated. The old methods, with the imolemented code, etc. are still there, after the erroneous extra lines.
Note also that the IDE gives you an error but, nevertheless, inserts all those empty methods.
So ... problem reproduced - mission: accomplished!
ETA: Forgot to add -
If you try this at home remember to backup the project you'lll be playing with before starting to play!!!