home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / openloo / 3291 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.7 KB  |  70 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!van-bc!sqwest!kim
  3. From: kim@sqwest.wimsey.bc.ca (Kim Adamson-Sharpe (kim@west.sq.com))
  4. Subject: Re: Xview popup problem
  5. Message-ID: <1992Jul30.170930.26550@sqwest.wimsey.bc.ca>
  6. Organization: SoftQuad (West), Vancouver, B.C.
  7. References: <268@ftms.UUCP>
  8. Date: Thu, 30 Jul 1992 17:09:30 GMT
  9. Lines: 59
  10.  
  11. In article <268@ftms.UUCP> brown@ftms.UUCP (Vidiot) writes:
  12. >
  13. >SunOS 4.1.1  OW2.0
  14. >
  15. >The following question is from one of our software development team members.
  16. >Any and all help is appreciated.
  17. >
  18. >
  19. >I am encountering some difficulty working around one of the "features"
  20. >of XView. Does anyone know how to get around the following?
  21. >
  22. >I create a popup window with its pushpin out. When ever a button is pressed,
  23. >the popup *always* disappears, even if I explicitly set the XV_SHOW attribute
  24. >for the frame to TRUE in the notify proc for the button, before the return
  25. >to the Notifier. I even tried sticking in the following code before setting
  26. >XV_SHOW, in the hope that executing the Notifier loop once might reset things,
  27. >but it still didn't work:
  28. >
  29. >    notify_dispatch();
  30. >    XFlush( (Display *) xv_get( frame, XV_DISPLAY ) );
  31. >
  32. >
  33. >The reason I want to do this is that my popup creates a list of filenames
  34. >and directories to load (the directory names have a "/" at the end to
  35. >distinguish them). If the user selects a directory name from the scrolled
  36. >list and presses the Load button, I want the popup to then display the list 
  37. >of filenames and directories in the selected directory. The 
  38. >list of files is successfully built and displayed (I know this because I
  39. >can see this when I step through execution of the code with the debugger),
  40. >but when the return to the Notifier is done from the button notify proc, 
  41. >the popup always disappears if the pushpin was out. I also tried setting
  42. >the FRAME_CMD_PUSHPIN_IN attribute to TRUE before the return to the
  43. >Notifier but that still didn't work.
  44. >
  45. >-- 
  46. >harvard\
  47. >  ucbvax!uwvax!astroatc!ftms!brown  or  uu2.psi.com!ftms!brown
  48. >rutgers/
  49. >INTERNET: brown@wi.extrel.com  or  ftms!brown%astroatc.UUCP@cs.wisc.edu
  50.  
  51.  
  52. This should be in the FAQ if it isn't already, since this is a common
  53. problem.
  54.  
  55. The default action (button push dismisses a command frame) is discussed
  56. on page 148 (section 7.7.2 Menu Buttons) in Vol. 7 the XVIEW Programming
  57. Manual by Dan Heller (Revised and Updated for Version 2). You can prevent
  58. the frame from being dismissed by setting the button's PANEL_NOTIFY_STATUS
  59. to XV_ERROR in the button's notify procedure.
  60.  
  61. Add this line to your button's notify proc:
  62.  
  63.     xv_set(button, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  64.  
  65. This will keep the command frame (popup window) up. That's it.
  66.  
  67. Kim.
  68. -- 
  69. Kim Adamson-Sharpe (kim@west.sq.com) SoftQuad (West).
  70.