home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 18785 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.6 KB

  1. Xref: sparky comp.windows.x:18785 comp.windows.x.motif:7270 comp.sys.sun.apps:2392
  2. Newsgroups: comp.windows.x,comp.windows.x.motif,comp.sys.sun.apps
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wupost!gumby!yale!yale.edu!jvnc.net!nuscc!iti.gov.sg!agnel
  4. From: agnel@iti.gov.sg (Agnel Rajendran (AIM))
  5. Subject: Popup dialogs 
  6. Message-ID: <1992Nov6.014838.21779@iti.gov.sg>
  7. Keywords: Dialog
  8. Sender: news@iti.gov.sg (News Admin)
  9. Organization: Information Technology Institute, National Computer Board, Singapore.
  10. References: <1992Oct30.192913.4999@mnemosyne.cs.du.edu>
  11. Date: Fri, 6 Nov 1992 01:48:38 GMT
  12. Lines: 38
  13.  
  14.  
  15. I am facing this problem in Motif 1.1.2 on SunOS 4.1.1.
  16.  
  17. Within a dialog callback function when I want to popup a warning dialog
  18. the dialog does not get blocked for user input. But the code after
  19. the dialog get executed. The dialog pops up after the main dialog is
  20. unmanaged. For example,
  21.  
  22.  
  23. OpenDialogCB(widget, client_data, call_data)
  24. ...
  25. {
  26.  
  27.     if (filename)      /* close previous file */
  28.         CloseCB(widget, client_data, call_data); 
  29.     .....
  30. }
  31.  
  32. CloseCB(widget, client_data, call_data) /* parameters not used */
  33. {
  34.     if (saved != True) /* check whether file is saved */
  35.     {
  36.         /* call warning dialog with error message ; 
  37.            get input from user to save or not
  38.         */
  39.         .....
  40.         CallWarningDialog(mesgstring);
  41.     }
  42.     CloseTextWidget();
  43. }
  44.  
  45. The CloseTextWidget() gets executed before the warning dialog appears.
  46.  
  47. Could any of you give me a simple solution to this? I presently know a work around.
  48.  
  49. Regards,
  50. Agnel
  51. (agnel@iti.gov.sg)
  52.