Re: Can't use TComponent in thread object?



brett wrote:
Here's what I started doing:
Form1 uses FTPthread
....and creates TFTPthread

TFTPthread uses TProgressthread
....and creates TProgressthread

TProgressthread uses Form1
....and gets a reference to a string property on Form1. TProgressthread
will stay in a loop checking the filesize every 5 seconds or so. It
will sleep in between. TProgressthread is stopped/destroyed by
TFTPthread.

Does this sound like a good model?

Only the main thread can work with the GUI. To work around this, check out the "Synchronize" procedure in your help. I don't see why you need a separate TProgressThread (But it may depend on which socket library you are using).

Cheers,
Nicholas Sherlock

--
http://www.sherlocksoftware.org
.