L
lkdbdlkq
Unregistered / Unconfirmed
GUEST, unregistred user!
Tchild=class(TThread)
private
public
end;
Ta= class(tchild)
public
procedure bbb;virtual;
constructor Create;
procedure Execute;override;
end;
tb=class(ta)
private
procedure bbb;
public
end;
constructor Ta.Create;
var
iniFile: TiniFile;
begin
inherited Create(True);
FreeOnTerminate := True;
Resume;
end;
procedure ta.Execute;
begin
bbb;
end;
c:=tb.create;
ta下面的子线程类tb的一个实例c创建执行,因为tb自身没有重写create 及execute函数,所以其create及execcute将执行父类中ta的这两个方法,如何在执行到ta.execcute函数
的时候,调用执行其子类tb中的实际函数bbb呢?
tb.create;
private
public
end;
Ta= class(tchild)
public
procedure bbb;virtual;
constructor Create;
procedure Execute;override;
end;
tb=class(ta)
private
procedure bbb;
public
end;
constructor Ta.Create;
var
iniFile: TiniFile;
begin
inherited Create(True);
FreeOnTerminate := True;
Resume;
end;
procedure ta.Execute;
begin
bbb;
end;
c:=tb.create;
ta下面的子线程类tb的一个实例c创建执行,因为tb自身没有重写create 及execute函数,所以其create及execcute将执行父类中ta的这两个方法,如何在执行到ta.execcute函数
的时候,调用执行其子类tb中的实际函数bbb呢?
tb.create;