Abstract error VCL component development and application are reported when a custom class instance is created in the thread.
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061225124650126.html
Tobj = Class (tobject)
Private
Fname: string;
Procedure setname;
Public
Property name read fname write setname;
End;
Tthreadprocess = Class (tthread)
Private
OBJ: tobj;
Protected
Procedure execute;
End;
Procedure tthreadprocess.exe cute;
Begin
OBJ: = tobj. Create // The error "abstract error" is returned"
End;
Why ??
Tthreadprocess = Class (tthread)
Private
OBJ: tobj;
Protected
Procedure execute; override;
End;
Procedure execute; virtual; abstract;
This is an abstract method and must be reloaded.
The Execute Process is override, Which is missed when it is hit.
tobj = Class (tobject)
private
fname: string;
procedure setname;
Public
property name read fname write setname;
end;
----------------------------------------
tobj = Class
private
fname: string;
procedure setname (const value: string ); // check whether the write is like this
Public
property name: String read fname write setname // you are missing: String
end;