Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!ucsd!pacbell.com!pacbell!sactoh0!unify!csusac!jelarcic From: jelarcic@csusac.csus.edu (Mikey Jelarcic) Newsgroups: comp.windows.x Subject: Re: blocking and X Keywords: blocking, X, Motif Message-ID: <1990Jul13.074122.27021@csusac.csus.edu> Date: 13 Jul 90 07:41:22 GMT References: <860@airgun.wg.waii.com> Reply-To: jelarcic@csusac.UUCP (Mikey Jelarcic) Organization: California State University, Sacramento Lines: 22 In article <860@airgun.wg.waii.com> lampshir@airgun.wg.waii.com (gregory b. lampshire) writes: >them. What I would like to do is use the following code segment > >Boolean answer; >... >answer = DoNotReturnWithoutAnswer("Do you want to continue?"); >... > >to return an answer. However, in the event driven environment, even Here's a possible solution, create a modal dialog box with the yes/no buttons. the activate callbacks (I'm speaking X here, not Motif but the solution should on Motif) of the buttons should set a variable to a certain value. In your DoNotReturnWithoutAnswer routine you should set this variable to a known value (not a value assocated with a button), bring up your dialog box and process events until the variable changes its value. I have used this method extensively for the software the company I work for makes. -- Michael L. Jelarcic ..!csusac!jelarcic "Who said what?!? Never heard of him, go away." - my employer