Path: utzoo!utgpu!watmath!att!bellcore!rutgers!gatech!uflorida!ukma!husc6!paperboy!osf!dean
From: dean@osf.osf.org (Dean Anderson)
Newsgroups: comp.windows.x
Subject: Re: help (with a popup prompt design)
Message-ID: <445@paperboy.OSF.ORG>
Date: 17 Aug 89 15:44:13 GMT
References: <3982@ncar.ucar.edu> <8908151941.AA26642@expo.lcs.mit.edu> <2523@arisia.Xerox.COM>
Sender: news@OSF.ORG
Reply-To: dean@osf.org (Dean Anderson)
Organization: Open Software Foundation
Lines: 28

In article <2523@arisia.Xerox.COM> janssen@holmes (Bill Janssen) writes:
>The one problem with the approach that converse@EXPO.LCS.MIT.EDU suggests
>is that the display_warning() routine will return from the warning-box
>creation routine prematurely.  To get around this, recursively call the
>main loop, and have the callback for the button return from the recursive
>call when pressed, thereby returning to the code in display_warning(), and

Recursively call XtMainLoop?  How do you propose to get XtMainLoop to
return? (Without using setjmp) I think the point of what Donna
Converse was originally trying to say has been missed.  Instead of
trying to force flow of control, you should adopt a model in which the
program takes actions in response to "external" events whose order the
program has no control over.

For example, If you want to force the user to respond to a dialog, try
popping up the dialog menu with a pointer grab.  When the user responds,
take whatever action is necessary in the callback (possibly save the
response data for use in modifying the actions for other events, etc).
 
Motif includes facilities for modal dialog widgets which do exactly
what it is I think that you want to do:  Make the user respond before any
further processing within the application.

            Dean

Dean Anderson                     |  Views Expressed do not represent those of  
dean@osf.org  uunet!osf.org!dean  |  either my employer or myself!
OPEN Software Foundation          |