🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23869

question about querying user synchronously in Xt

#23869
From: Tom Tulinsky
Date: Wed, 19 Jun 1991 15:09
29 lines
1393 bytes
In the X Frequently Asked Questions list, no. 106, some code is given
that allows you to query the user at a given point in  a program and
not proceed past that point until he answers.  To do this it uses a
private event loop:         

         (create modal dialog box)
         while (answer == RET_NONE || XtAppPending(context)) {
                XtAppProcessEvent (context, XtIMAll);
         }
         (answer is a global which is set by the callbacks of the dlg
          box)

I'm wondering why XtAppPending() is in the while condition.  Would
this work just as well?

   while(answer==RET_NONE) {
      XtAppProcessEvent (context, XtIMAll);
   }


 Coral
     * **	Tom Tulinsky                508 460-6010
  *  **		Coral Network Corporation   fax 508 481-6258
*  ** 		734 Forest St               net: tomt@coral.com
 ***		   Marlboro, MA 01752		
  **		   U S A
*********	   
NETWORKS	      
Technical Details
Message-ID: <9106191509.AA00135@maui.coral.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines
From: tomt@maui.coral.COM (Tom Tulinsky)
Newsgroups: comp.windows.x
Subject: question about querying user synchronously in Xt
Message-ID: <9106191509.AA00135@maui.coral.com>
Date: 19 Jun 91 15:09:51 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 29