Re: Can't use TComponent in thread object?



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?

Thanks,
Brett

.



Relevant Pages

  • Re: Help with the, "this" initializer in a constructor.
    ... explicitly or not; But how you can override such ... In the case above, it's still calling the base constructor, which is calling ... derived class, ...
    (microsoft.public.dotnet.languages.csharp)
  • 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: Type Load failure in Web Service Client
    ... >> System.Web.Services.Protocols.Soap HttpClientProtocol ... > calling a connection that fails. ... If the base constructor is checking for something, ...
    (microsoft.public.dotnet.framework.compactframework)