[Lazarus] TApplication.UpdateMainForm

Ondrej Pokorny lazarus at kluug.net
Thu Feb 18 11:25:27 CET 2016


On 18.02.2016 10:40, Graeme Geldenhuys wrote:
> On 2016-02-18 01:09, Fabio Luis Girardi wrote:
>> Because TForm publishes some properties that I want keep in protected
>> section.
> That would have been my answer too.  I fully agree, classes or methods
> should use the lowest possible class in the hierarchy, thus any
> descendants are usable too.

There is a functionality difference between TCustomForm and TForm in the 
LCL.
See e.g. TCustomForm.GetRealPopupParent (uses Screen.ActiveForm) or 
TApplication.UpdateVisible (uses Screen.Forms).

So this is wanted and by design. It is also coming from Delphi. Every 
"normal" form that you use has to be a descendant of TForm if you like 
it or not.
Descendants of TCustomForm are special forms like hint windows etc.

Ondrej




More information about the Lazarus mailing list