Re: Can't use TComponent in thread object?
- From: Nicholas Sherlock <N.sherlock@xxxxxxxxx>
- Date: Sat, 25 Nov 2006 15:46:08 +1300
Rob Kennedy wrote:
brett wrote:TMyThread=class(TThread)
private
proglabel:TLabel;
procedure UpdateProgress;
public
constructor create(createsuspended:boolean; progressLabel:TLabel);
end;
constructor TMyThread.create(createsuspended:boolean; progressLabel:TLabel);
begin
inherited(createsuspended);
I get an incompatible types error on the inheritied line. I understand
you are calling the base constructor, which takes a boolean. Why does
it fail when I pass it the correct parameter?
When passing parameters, you need to include the name of the method you're calling:
inherited Create(CreateSuspended);
Whoops, I was in Java mode :).
Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org
.
- References:
- Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Jamie
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Rob Kennedy
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Nicholas Sherlock
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Nicholas Sherlock
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Rob Kennedy
- Can't use TComponent in thread object?
- Prev by Date: Re: TimeSetEvent
- Next by Date: Re: Can't use TComponent in thread object?
- Previous by thread: Re: Can't use TComponent in thread object?
- Next by thread: Re: Can't use TComponent in thread object?
- Index(es):
Relevant Pages
|