Re: Can't use TComponent in thread object?
- From: "brett" <account@xxxxxxxxx>
- Date: 22 Nov 2006 22:02:00 -0800
You mean thread := TMyThread.create(true);
Ah! Thanks. That fixes the exception but the thread doesn't seem to
go. Here's my code:
thread := TProgressThread.Create(true);
thread.HostAddress := _hostAddress;
thread.UserName := _userName;
thread.Password := _password;
thread.RemoteDirectory := _remoteDirectory;
thread.RemoteFile := _remoteFile;
thread.LocalDirectory := _localDirectory;
thread.Resume;
Shouldn't it execute on the Resume call? I create the thread suspended
so I can assign variables for the FTP class inside of TProgressThread.
In TProgressThread's Execute method, I start the FTP download. But
nothing is happening. The FTP works when I use it in the same Unit (no
multi threading). There must be some thing on the thread I missed to
get it going.
Thanks,
Brett
.
- Follow-Ups:
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- 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: Nicholas Sherlock
- Can't use TComponent in thread object?
- Prev by Date: Re: Can't use TComponent in thread object?
- Next by Date: Re: More accurate Timerevent
- 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
|