Path: utzoo!attcan!uunet!airgun!lampshir From: lampshir@airgun.wg.waii.com (gregory b. lampshir) Newsgroups: comp.windows.x.motif Subject: Blocking actions in Motif and X Keywords: Motif, X, Blocking Message-ID: <858@airgun.wg.waii.com> Date: 10 Jul 90 13:42:25 GMT Organization: Western Geophysical, Houston Lines: 46 Greeting peoples.... I am hoping that all you Motif experts out there can help me on a small problem I am having. What I wish to do is create an application modal, blocking yes/no widget. Let me explain. I am writing a program that must ask alot of yes/no questions. These questions are critical and hence, the program cannot continue without 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 with the widget's dialog type set to application modal, the func 'DoNotReturnWithoutAnswer' returns before the user can respond. The yes/no widget, however, is left displayed waiting for the user in an event driven manner. What I really need is to block until the user responds, could someone give me some skeleton code to show me how to do this? The sequence of events should be thus.... 1) call the yes/no func 2) popup a small window with the question string as the display string 3) create a yes and a no push button 4) block and grab the pointer (confined to the yes/no window box) until the user responds 5) return either True or False I have made some progress. Using Intrinsics and the XtPopup() group of funcs I can make the widget popup (without any fancy borders which is what I wanted anyway) and display the two push buttons with label string. No problem. I even grabbed the pointer. However, the event loop necessary for the blocking action is still alittle beyond me. How about some help? gregory lampshire | Searching for a computer which can do it western geophysical | all......