Creating Delphi Objects at runtime based on class type
Posted
by Sandeep
on Stack Overflow
See other posts from Stack Overflow
or by Sandeep
Published on 2010-03-28T22:16:37Z
Indexed on
2010/03/28
22:23 UTC
Read the original article
Hit count: 206
Is it possible to create objects at runtime based on it's type by calling a method.
What I am trying to achieve is
var
lForm1 : TForm;
lForm2 : TForm;
begin
CreateObjects([lForm1, lForm2]);
// After this call I have the variables initialized and I can use them.
end;
© Stack Overflow or respective owner