LCL: TCustomForm DoCreate moved to AfterConstruction to be fully delphi compatibile. fixes #14120

git-svn-id: trunk@24525 -
This commit is contained in:
zeljko 2010-04-08 18:25:05 +00:00
parent 21d5eda8e4
commit 724575d244
2 changed files with 14 additions and 1 deletions

View File

@ -558,6 +558,7 @@ type
constructor Create(AOwner: TComponent); override;
constructor CreateNew(AOwner: TComponent; Num: Integer = 0); virtual;
destructor Destroy; override;
procedure AfterConstruction; override;
procedure BeforeDestruction; override;
class function GetControlClassDefaultSize: TPoint; override;

View File

@ -66,6 +66,19 @@ begin
end;
end;
{------------------------------------------------------------------------------
Method: TCustomForm.AfterConstruction
Params: None
Returns: Nothing
Gets called after the construction of the object
------------------------------------------------------------------------------}
procedure TCustomForm.AfterConstruction;
begin
DoCreate;
inherited AfterConstruction;
end;
{------------------------------------------------------------------------------
Method: TCustomForm.BeforeDestruction
Params: None
@ -1772,7 +1785,6 @@ begin
// MG: Ignoring is best at the moment. (Delphi raises an exception.)
end;
//DebugLn('[TCustomForm.Create] D Class=',Classname);
DoCreate;
//DebugLn('[TCustomForm.Create] E Class=',Classname);
finally
Exclude(FFormState, fsCreating);