Slowly going NUTS
I'm working my way through this but I'm now getting an error 211 when I'm creating the threads.
I have cthreads first in the uses statement
uses
cthreads,
cmem,
heaptrc,
Interfaces,
Forms
I have {$threading on} set
the thread definition is simple
Type
TReadThread = class(TThread)
private
procedure showstatus;
protected
procedure Execute;
public
Constructor Create(Createsuspended:boolean);
end;
the thread create is minimal
constructor TreadThread.Create(CreateSuspended : boolean);
begin
FreeOnTerminate := True;
inherited Create(CreateSuspended);
end;
there is a simple showstatus proc
procedure TreadThread.showstatus;
begin
mainform.threadout.add(timetostr(now));
end;
I have simplified the execute to just running showstatus using synchronize
procedure TReadThread.Execute;
begin
while (not Terminated) do
begin
synchronize(@showstatus);
sleep(1000);
end;
end;
What am I Missing?