Re: NEWERA -- getWindow() in functions
Posted in 1997
Mike Ripley wrote: > > In article <869067640.18903.0.nnrp-2.c2de7bed@news.demon.co.uk>, Michael > Andreasen <michael-news@newsoft.demon.co.uk> writes > >In article <mNEmUGAiPIzzMAo6@excelsis.co.uk>, Mike Ripley > ><mike.ripley@excelsis.co.uk> wrote: > >>We use a function to perform table lookups. This function is stand alone > >>and not part of any class. (This is probably where our problem lies!). > >>The function creates a list box in a modal window and we want this > >>window to be contained by the current window. We do this by changing the > >>containingWindow property. > >>Our problem is that we cannot get the containing Window from within the > >>function and we have to resort to passing the window on the calling line > >>of the look up function. > >>Is there a better way? > > > >How does the lookup window pass the selection back to the containing window? > > Via a global char(*) > > -- > Mike Ripley Here is how we do it. ... ... create modal window(containingWindow : mainWindow) open modal window() // here the control will stop until the modal window is closed // or hidden. We have OK and Cancel buttons. // Populate member variables with the data in the modal dialog. // Call hide() when they click any of the buttons get the member variables of the modal window close the modal window() I know its not pretty. Hey, but it works. - Reddy