🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #261

event loops

#261
From: Pamela Chan
Date: Wed, 08 Apr 1992 19:15
21 lines
923 bytes

The event loop for a filechooser looks like this:
    Event e;
    int status = 0;
    do {
        status = filechooser->Accept();  // has another while loop inside
        if (status == 0) {
            cout << filechooser->Choice() << endl;
            cout.flush();
        }
    } while (!world->session()->done() && (status==0));


The event loop for world->run() looks like this:
    Event e;
    do {
	read(e);
	e.handle();
    } while (!done);
}
Technical Details
Message-ID: <1992Apr8.191510.13744@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!pasteur!chan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!pasteur!chan
From: chan@ICSI.Berkeley.EDU (Pamela Chan)
Newsgroups: comp.windows.interviews
Subject: event loops
Message-ID: <1992Apr8.191510.13744@pasteur.Berkeley.EDU>
Date: 8 Apr 92 19:15:10 GMT
Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
Organization: International Computer Science Institute, Berkeley, CA, U.S.A.
Lines: 21
Nntp-Posting-Host: icsid1