Hi,
I am improving a Delphi program...
There is a procedure that expects a TFormClass
argument (class of TForm)
.
I passed in TForm1 or like and it did not like. E.g. procname(TForm1);
There are other forms in the program that are passed in similarly in the program,
yet there is no such compilation errors for them.
E.g. there is another form that is passed and it is defined as
type TForm4 = class(TForm)
....
procname(TForm4);
This does not cause a compilation error.
My form is defined as type
TForm1 = class(TForm)...
It looks similar, right? What may be the reason this is not accepted by the compiler?
Why are the others accepted ? What may be the difference?
Thank you.