Re: Can't use TComponent in thread object?



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);

--
Rob
.



Relevant Pages

  • Re: Cant use TComponent in thread object?
    ... you are calling the base constructor, which takes a boolean. ... it fail when I pass it the correct parameter? ... you need to include the name of the method you're calling: ...
    (alt.comp.lang.borland-delphi)
  • Re: I need help please!
    ... under some circumstances to fail. ... either calls fflush(I guess the waste of the calling overhead ... Or is the existence of working, practical computer code on the ... someone else did /his/ homework. ...
    (comp.lang.c)
  • Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
    ... what is the return value of the CreateFile() call in the failing case? ... return error code 183in next power cycle. ... The environment which we know have higher fail rate - ... Calling WinUSB_ReadPipe& WinUSB_WritePipe ...
    (microsoft.public.development.device.drivers)
  • Re: Forget the security industry!
    ... I don't need those things to protect me because I know how to protect my ... I fail to understand a threat base, in case I fail to properly ... You seem to think that they are selling dangerous tools to people, ... Calling an illegal alien an "undocumented worker" is like calling a ...
    (comp.security.firewalls)
  • [PATCH 6/9] USB: cxacru: create sysfs attributes in atm_start instead of bind
    ... Since usbatm doesn't set the usb_interface driver data until after calling ... data is useless until the first status poll runs. ... atm_start could still fail either. ...
    (Linux-Kernel)