|
Previous Top Next |
This class is derrived from the ABC WindowManager class and can replace it to implement the Global Thread class to the application. For it to work it is neccessary to change the Window Manger from WindowManager class to ITWindowManagerClass in the application global actions:
Once this is done you can use the Global Thread class to control closing windows and closing all threaded windows. Every window on a thread is added and is closed in reversed order of opening. For example if Proc1 calls Proc2 which calls Proc3, then Proc3 is first closed, then Proc2 and finally Proc1. Note that this cannot force the windows to close. If for example a form is open and changes have been made to a record it will not be able to close the form window.
ITWindowManagerClass CLASS(WindowManager),TYPE,Module('ITWindowManagerClass.clw'),Link('ITWindowManagerClass',_ITUtilLinkMode_),DLL(_ITUtilDllMode_)
ThreadClass &ITGlobalThreadClass
ErrorClass &ErrorClass
WindowRef &Window
Init Procedure(Window pWIN, ITGlobalThreadClass pThreadClass, ErrorClass pErrorClass)
Kill PROCEDURE,PROC,BYTE,VIRTUAL ! Level:Notify means dead already
TakeWindowEvent PROCEDURE,VIRTUAL,BYTE,PROC
END