[lazarus] Code pattern question

Michal Bukovjan bukovjan at mbox.dkm.cz
Thu Nov 7 11:39:05 EST 2002


Hi,

when looking at the code of Lazarus (not LCL), I found that quite often 
when we create a control (say, in constructor), we do it quite often via 
code like:

AControl:= TControl.Create(AOwner)
with AControl do begin
   Parent ...
   Name:= 'LongControlName';
   Visible:= true;
end;

Is setting up Name and Visible (to true) necessary?

'Name' does not make sense for controls created like this and visibility 
is always true by default.

Is there any reason, or can this be cleaned up (over time, not 
necessarily now), (reducing Lazarus size somewhat).

Michal






More information about the Lazarus mailing list