Hi,
Some time ago I needed to implement a auto Log-off (after a certain period of time) functionality on our application. The idea was to close all opened windows, remain on the MDI and display the Log-in window again. With the valuable help of Crhis Pollach I implemented a WindowManager object that helped me to achieve this behavior. Our application is quite big so covering all different scenarios when auto log-off occurs is almost impossible.
Unfortunately we started discovering some issues when response windows were opened and response windows where opened at that time.
What happened is that all windows are closed (including response ones in its parent close event) and log-in window is displayed (another response one). Fine!
But, when the user logs-in back again then errors starts to appear. I found that the issue because of response windows. After I log back again and process all related task for the log-in procedure PB stat processing the remaining code on the parent event where the response window was opened. In most of the cases processing the return value for the response window (that hasn't, as it was programmatically closed) and accessing instance objects and vars that are no longer valid as the window where they were created no longer exists (at least for the user).
I've tryed using Yield and loops with Yield but nothing happens, the behavior continues to be de same.
Is this behavior the expected? Any idea on how to bypass this situations?
Thanks a lot!