🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13988

Re: How to Trigger the Main Program from a Timer Procedure?

#13988
From: Remy Lebeau (TeamB)
Date: Mon, 01 Sep 2003 20:08
22 lines
1785 bytes
"Phuoc Can HUA" <home}a+t{huaonline.com> wrote in message
news:oprus769kobq7az6@newsgroups.borland.com...

> How can the timer 'tell' the main program that next file
> has to be loaded? Since the loading of a file could take
> relatively long or even error, so that I don't want to put
> it into the timer procedure.

Move the loading code into a separate thread instead.  Either pass the
thread an array of filenames to load in a loop, or else have the thread load
a single file and then use its OnTerminate event (assuming you use TThread)
to start the next file loading thread.


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03
Technical Details
Message-ID: <3f53a731$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <oprus769kobq7az6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e4cd861378e7d24
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-01 13:09:34 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <oprus769kobq7az6@newsgroups.borland.com>
Subject: Re: How to Trigger the Main Program from a Timer Procedure?
Date: Mon, 1 Sep 2003 13:08:33 -0700
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f53a731$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062446897 207.175.226.26 (1 Sep 2003 13:08:17 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail