Re: NEWERA -- getWindow() in functions
Posted in 1997
Yes, there is, but it I assume it will require large rework for you. All windows should be created by a central controlling class, this class therefore has the concept of the 'current' window and this value can be obtained by means of a shared function within the controlling class. But :- Why are you having a function outside a class (4gl conversion ?) Why is this function which is responsible for data attempting to 'play' with windows. A better way would be for the window in question to ask a generic look up class for the required data, so all the look-up class is responsible for is servicing data requests. Have done many similar designs PS: Are you cacheing the look-ups, if not, why not? Hope this is some help. David Beale Lighthart Ltd , Reading UK Mike Ripley <mike.ripley@excelsis.co.uk> wrote in article <mNEmUGAiPIzzMAo6@excelsis.co.uk>... > 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? > -- > Mike Ripley >