On 4/3/09, Jonas Maebe <[email protected]> wrote:
> I think what is meant, is that if you create a direct subclass of TObject,
> there is no need to call TObject's create constructor (e.g., via "inherited
> create;") from your own constructors. It doesn't hurt if you do it of
> course, and may be good practice to account for future situations where the
> parent class may change.
I often wondered abou that.
So if i understand correctly:
Say I have
Type
TFoo = class;
private
fSomeField: Integer;
public
constructor Create;
end;
then
constructor TFoo.Create
begin
Inherited Create;
fSomeField := -1;
end;
would in essence be equal to
constructor TFoo.Create
begin
fSomeField := -1;
end;
Since TOblect.Create "does nothing".
Bart
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal