Re: display on last line
Posted in 1993
Harry Bochner writes: } } } I don't know an elegant solution, but we can do a little better than that. } } First, to avoid screen-flashing: don't put the message on the background window. } Instead, create a separate window just for it, positioned at line 24 (or } where ever you want the messages to go). And make sure none of the other } windows of your application overlap with the message window. Then you can } switch back and forth without any flashing. I like this. } } There doesn't seem to be an elegant way to switch back to the previous } window. But here's what I did in the one application where the user demanded } this feature. This routine takes the message, and a 1 char code identifying } the current window, as arguments. } } function msg_show(msg, w) } define msg char(75) } define w char(1) } } current window is mwind } message msg clipped attribute (reverse) } } case w } when "p" } current window is pwind } when "k" } current window is kwind } when "d" } current window is dwind } when "i" } current window is iwind } end case } end function } } This requires that the function know the names of all the other windows, } and so it can't be extended to a general purpose library routine :-( } And that keeps me from enthusiastically using this technique in other } applications :-( } But I think it's a bit neater than switching back manually, as in Jack's } method. } Not crazy about this. I like the concept of a single line window wherever where the data is displayed. If you have five windows and you're never going to add another window then this is fine. But, when you have 200 windows this becomes an obnoxious case statement. Also when you are going to add a new window you have to remember to edit this function to include the new window - not quite a modular style (as you indicate). I think the proper solution would be to modify 4gl (are you listening John?) to allow it to set window to a variable: FUNCTION foo(c_window) DEFINE c_window whatever CURRENT WINDOW IS c_window ..... cheers j. _____________________________________________________________________________ Jack Parker - Contractor | Hewlett Packard, BSMC Boise, Idaho, USA| If you keep staring at it like that, jparker@hpbs2561.boi.hp.com | your nose is going to grow (208) 396-5388 (W) (208) 384-1623 (H) | into the bark. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________