Hi,
I am a Lazarus beginner and have got only a few modifications for the LCL/FPC yet. Later, I will get part of the development community, but at the moment, I would prefer that someone takes a look at my proposals and makes the changes.
forms.pas
declaration of class tForm:
procedure Close; -> should be virtual to enable overriding
procedure Show; -> should be virtual to enable overriding
controls.pas
declaration of class tControl
move from private to protected:
procedure SetFont(Value: TFont) -> should be virtual to enable overriding
classesh.inc (fpc rtl)
declaration of class tList:
procedure Delete -> should be virtual to enable overriding
--------------------------
proposal for a new tForm event:
In WDsibyl, there's a useful Form procedure / Form event which is not part of Lazarus and Delphi: SetupShow/OnSetupShow
The SetupShow has to be executed the first time when the Form is shown. boolean "IsFirstShow" has to be set to true in Create.
procedure tSibylForm.Show;
begin
if IsFirstShow then SetupShow;
IsFirstShow := false;
inherited Show;
end;
This would be a useful feature for lots of Lazarus (Delphi) users, because when overriding the Create constructor, a lot of stuff (e.g. Window handles) is not initialized yet and a lot of initialization stuff fails there. Lots of programmers have to override Show and need to write this simple code again and again...
In WDsibyl, there's also a SetupComponent procedure and an OnSetupComponent event which is more handy than overriding the constructor. Would be nice to have, but the OnSetupComponent is nearly the same as OnCreate.
Martin V. (Munich, Germany)