[fpc-devel] TCustomApplication's parent class?
Sergei Gorelkin
sergei_gorelkin at mail.ru
Sun Apr 27 09:35:44 CEST 2008
Graeme Geldenhuys wrote:
>
> I just noticed that it is common usage to call
> SomeForm.Create(Application), which is now not possible. As it stands
> now, it breaks your fpGUI article's demo application as well, which I
> don't want to do. :)
In fact, TSomeForm.Create(Application) should work and should be enough
for all cases. In my vision, the purpose of Application.CreateForm is a
workaround for odd VCL architecture: it assigns object reference before
calling its constructor, so that you can use global variables like
"Form1" within FormCreate handler without getting a segfault. But doing
so is bad, extremely bad practice...
> OK, I'll change TfpgApplicationBase to derive from TComponent again.
Finding a solution of the problem is always better, although harder,
than masking it out :)
Best regards,
Sergei
More information about the fpc-devel
mailing list