Re: Informix 4GL question
Posted in 1997
Belakimem wrote: > > Suppose you have an orders screen / function with an option to transfer to > the customer screen. > > Suppose also your customer screen / function can transfer to the orders > screen. > > Both functions can be called from a menu in main first, and both have an > option to exit back to the main menu. > > Now, it is obviously possible to call customers then orders, then > customer, then orders etc. and travel endlessly down many levels of the > function / subroutine stack. > > In 4GL would this be good programming practice? What are your opinions on > avoiding this problem, if it is one. Is it better to always return to the > calling function before going into this spiral? > > Please reply to my email address as well as the newsgroup. Thank You. I have a similar situation, though I have not yet implemented the sideways transfer of current screen. I keep track of which window and for I have open. I have defined a separate window for wach screen I plan to display. When I DO [re]display a window, I puch the name of the current window onto a stack. Before returning from the function, I pop back the window that had been current when the function was called. My plan is that when a user needs to make a sideways change of screen, I would pop the current window out and bring in the new one, with any old data that happened to be in the variables. All my windows are imposed over the main-menu window, which I never pop. The pushing & popping work, though I have not yet tried the sideways stuff. BTW, I really wish Informix had allowed me to specify a window name in a variable. My "set window" function uses a CASE statement. UGH! -- -- Jake (In persuit of undomesticated aquatic avians) +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+