home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!van-bc!sqwest!kim
- From: kim@sqwest.wimsey.bc.ca (Kim Adamson-Sharpe (kim@west.sq.com))
- Subject: Re: Xview popup problem
- Message-ID: <1992Jul30.170930.26550@sqwest.wimsey.bc.ca>
- Organization: SoftQuad (West), Vancouver, B.C.
- References: <268@ftms.UUCP>
- Date: Thu, 30 Jul 1992 17:09:30 GMT
- Lines: 59
-
- In article <268@ftms.UUCP> brown@ftms.UUCP (Vidiot) writes:
- >
- >SunOS 4.1.1 OW2.0
- >
- >The following question is from one of our software development team members.
- >Any and all help is appreciated.
- >
- >
- >I am encountering some difficulty working around one of the "features"
- >of XView. Does anyone know how to get around the following?
- >
- >I create a popup window with its pushpin out. When ever a button is pressed,
- >the popup *always* disappears, even if I explicitly set the XV_SHOW attribute
- >for the frame to TRUE in the notify proc for the button, before the return
- >to the Notifier. I even tried sticking in the following code before setting
- >XV_SHOW, in the hope that executing the Notifier loop once might reset things,
- >but it still didn't work:
- >
- > notify_dispatch();
- > XFlush( (Display *) xv_get( frame, XV_DISPLAY ) );
- >
- >
- >The reason I want to do this is that my popup creates a list of filenames
- >and directories to load (the directory names have a "/" at the end to
- >distinguish them). If the user selects a directory name from the scrolled
- >list and presses the Load button, I want the popup to then display the list
- >of filenames and directories in the selected directory. The
- >list of files is successfully built and displayed (I know this because I
- >can see this when I step through execution of the code with the debugger),
- >but when the return to the Notifier is done from the button notify proc,
- >the popup always disappears if the pushpin was out. I also tried setting
- >the FRAME_CMD_PUSHPIN_IN attribute to TRUE before the return to the
- >Notifier but that still didn't work.
- >
- >--
- >harvard\
- > ucbvax!uwvax!astroatc!ftms!brown or uu2.psi.com!ftms!brown
- >rutgers/
- >INTERNET: brown@wi.extrel.com or ftms!brown%astroatc.UUCP@cs.wisc.edu
-
-
- This should be in the FAQ if it isn't already, since this is a common
- problem.
-
- The default action (button push dismisses a command frame) is discussed
- on page 148 (section 7.7.2 Menu Buttons) in Vol. 7 the XVIEW Programming
- Manual by Dan Heller (Revised and Updated for Version 2). You can prevent
- the frame from being dismissed by setting the button's PANEL_NOTIFY_STATUS
- to XV_ERROR in the button's notify procedure.
-
- Add this line to your button's notify proc:
-
- xv_set(button, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
-
- This will keep the command frame (popup window) up. That's it.
-
- Kim.
- --
- Kim Adamson-Sharpe (kim@west.sq.com) SoftQuad (West).
-