🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #317

WaitFor, TEvents and all that

#317
From: Ian Boag
Date: Tue, 07 Nov 2000 00:00
28 lines
1699 bytes
I am trying to get to grips with using WaitFor and TEvents. So I have put
together a very simple program that encapsulates my problem. It has two
buttons an a list box. Whan I click Button1, it sets off a process that
waits for Button2 to be clicked. The a message is put up  ...

First I make a TEvent (MyEvent) and Create it.

Form1.Create is
MyEvent.Create(nil,false,false,'');

Button1Click is then
  MyEvent.ResetEvent   (turns it "off")
  MyEvent.WaitFor(20000); (wait 20 seconds)
  write some sort of message

Button2Click is just
  MyEvent.Set

When I do all this I get an exception error to do with accesses and stuff
that I don't understand any of. Anyone able to help?

The reason I want to do this is actually much more complicated that two
buttons, but if I can make this one work I'll be able to do the auto FTP
client that I an REALLY trying to build ....

       Cheers

          Ian Boag
Technical Details
Message-ID: <q2PN5.506$lvle.14549196@news.xtra.co.nz>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10baee,dbd95fd5491965e8,start
X-Google-Attributes: gid10baee,public
X-Google-Thread: 1043cf,dbd95fd5491965e8,start
X-Google-Attributes: gid1043cf,public
From: "Ian Boag" <ianboag@partslink.co.nz>
Subject: WaitFor, TEvents and all that
Date: 2000/11/07
Message-ID: <q2PN5.506$lvle.14549196@news.xtra.co.nz>
X-Deja-AN: 690638457
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Complaints-To: newsadmin@xtra.co.nz
X-Trace: news.xtra.co.nz 973585686 210.54.222.24 (Tue, 07 Nov 2000 21:28:06 NZDT)
Organization: Xtra
X-MSMail-Priority: Normal
NNTP-Posting-Date: Tue, 07 Nov 2000 21:28:06 NZDT
Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.objectpascal