Re: Can't use TComponent in thread object?
- From: Nicholas Sherlock <N.sherlock@xxxxxxxxx>
- Date: Fri, 24 Nov 2006 13:47:09 +1300
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
.
- 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: Rob Kennedy
- Re: Can't use TComponent in thread object?
- From: brett
- Can't use TComponent in thread object?
- Prev by Date: Re: Can't use TComponent in thread object?
- 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):