Re: Keeping Track of Windows
Posted in 1994
In <155.365.uupcb@digitec.co.za> billy.wheeler@digitec.co.za (Billy Wheeler) writes: >Hello! >Some comments on your problem outlined below: >-> The problem is I call this from many different windows and I need to >-> know from which window or function the call was made so I can return >-> to the correct window. Four or five windows are open on the screen at >-> once and I need a method of deciding which window to make current >-> after displaying the status message. >How about: >main >open window w_1 at ... >open window w_2 at ... >open window w_problem at ... What's really needed is a call to find out the current window, then one can implement a stack of open windows easily. (This is true for many other settings as well, such as what keys do what.) I.e., let curwin = current window where curwin in some neutral data type that can hold the info (an int, a new type, etc.) Then current window is curwin should set it back, one can make an array of these to do stacks to push/pop windows, etc. I kludged this up for the accept key (see the code for the iedit "simple editor" I posted a while back). The kludge is to pass in a string saying what to do, i.e., push_acckey("RETURN"), but that presumes the 4gl code can do something with the string to get it set, which is feasible. It's not as feasible with window names, unless someone confesses how one can manually (from C or 4gl) select a window by its name as a string. -- Andrew Burt aburt@du.edu "But if he was dying he wouldn't bother to carve "Aaaaargh", he'd just say it."