[Lazarus] TApplication.UpdateMainForm
Ondrej Pokorny
lazarus at kluug.net
Thu Feb 18 12:03:00 CET 2016
On 18.02.2016 11:53, Graeme Geldenhuys wrote:
> On 2016-02-18 10:25, Ondrej Pokorny wrote:
>> So this is wanted and by design. It is also coming from Delphi.
> >From what I remember (Delphi 7 and earlier), any TCustomXXX is used for
> descendants and component writers. The "final" class without the
> "custom" part in the name is simply a empty class, but with the
> properties Published.
>
> I know the Delphi form designer used TForm for descendants - I always
> thought that to be wrong (from a design point of view). I understand why
> Delphi did that though - to overcome the Delphi Form Designer
> limitations, where it uses RTTI get read and set properties, and thus
> needs published properties.
>
> TApplication is not a component you can drop on a form though, so should
> not be grouped with the same limitations as the Delphi Forms Designer.
>
> My argument is exactly the same as why many components use TStrings as a
> property parameter, instead of TStringList.
Your argument is valid for TStrings/TStringList, TCustomEdit/TEdit etc.
but not for TCustomForm/TForm. This is a historical relict Lazarus has
inherited from Delphi. Normal forms (that you put controls on and work
with them normally) have to be inherited from TForm or you will be
facing strange effects (like wrong PopupParent on ShowModal etc.). It's
the same in Delphi.
There could be another design chosen but Delphi chose this one. You have
to live with it.
As I said before, it's by design so your arguments are nil here.
Btw. Delphi 7 has no PopupParent property - it was introduced in Delphi
2006 (maybe 2005 but who cares about it).
Ondrej
More information about the Lazarus
mailing list