Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!elan!tom From: tom@elan.Elan.COM (Thomas Smith) Newsgroups: comp.windows.open-look Subject: Re: xview confusion - command frames disappearing Message-ID: <981@elan.Elan.COM> Date: 10 Apr 91 21:38:06 GMT References: <1991Apr9.215503.20523@cs.umn.edu> Organization: Elan Computer Group, Inc., Mountain View, CA Lines: 41 From article <1991Apr9.215503.20523@cs.umn.edu>, by brsmith@cs.umn.edu (Brian R. Smith) [ - No relation]: > I've got a command frame with a large number of check boxes, and four > buttons; Done, Cancel, Reset, and Optimum. Done and Cancel are > somewhat obvious, Reset turns all the check boxes on (the default), > and Optimum sets each to a computed setting. > > Now here's the weird part: Whenever any of these four buttons is > pressed and released the command frame is taken down. (XV_SHOW set to > FALSE.) Even if there isn't a callback for that button. > > Is this supposed to happen? Yes, it's "supposed" to happen, but obviously isn't what you want. I have complained to Sun several times in the last couple of years about this interpretation of the OpenLook Style Guide, to no avail. It is built into XView to remove the window when any PANEL_BUTTON is pressed. It is particularly damaging when your particular "Do It" action in your dialog box encounters an error. In that case you want to leave the dialog box up so that the context of the error is still present for the user to see (and correct). > If it is supposed to work that way, how can I turn it off? Fortunately, it is easy to find the cause in the source (if you have it). In libxvol/panel/p_btn.c, you will find a function called "take_down_cmd_frame." Simply remove the body of the function. In fact, this function is the last global function in the file. Someone I know, who shall remain nameless, actually has located this function in the libxview.a library and inserted a sparc 'return-from-procedure' instruction at the beginning using adb! Nice to know there are some real (tm) programmers left... Hope this helps, Thomas Smith Elan Computer Group, Inc. (415) 964-2200 tom@elan.com, ...!{ames, uunet, hplabs}!elan!tom