Parece que hace falta aquí repasar los conceptos básicos de las clases en Delphi.
La ayuda de Delphi, al la letra, dice:
Cita:
Empezado por Ayuda de Delphi
A constructor is a special method that creates and initializes instance objects. The declaration of a constructor looks like a procedure declaration, but it begins with the word constructor. Examples:
constructor Create;
constructor Create(AOwner: TComponent);
Constructors must use the default register calling convention. Although the declaration specifies no return value, a constructor returns a reference to the object it creates or is called in.
A class can have more than one constructor, but most have only one. It is conventional to call the constructor Create.
To create an object, call the constructor method on a class type. For example,
MyObject := TMyClass.Create;
|
Más adelante dice:
Cita:
Empezado por Ayuda de Delphi
When a constructor is called using an object reference (rather than a class reference), it does not create an object. Instead, the constructor operates on the specified object, executing only the statements in the constructor's implementation, and then returns a reference to the object. A constructor is typically invoked on an object reference in conjunction with the reserved word inherited to execute an inherited constructor.
|
// Saludos