maher Posted January 26, 2015 Share Posted January 26, 2015 When Terminated (By CloseBrowser) the UniGUIMainModuleDestroy procedure Will not be executed!!!!!!! it's be executed just when "Close" The Main Form!!!! How can Call the UniGUIMainModuleDestroy procedure on Terminated Thanx Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 26, 2015 Administrators Share Posted January 26, 2015 Have you set this: MainModule->TerminateOnBrowserClose -> True Quote Link to comment Share on other sites More sharing options...
maher Posted January 27, 2015 Author Share Posted January 27, 2015 Yes. Even when Call UniSession.Terminate(); "UniGUIMainModuleDestroy" not executed Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 27, 2015 Administrators Share Posted January 27, 2015 I can not confirm this. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 27, 2015 Administrators Share Posted January 27, 2015 Let me remind that OnDestroy event is not called immediately. It is called a few seconds later. Quote Link to comment Share on other sites More sharing options...
maher Posted January 27, 2015 Author Share Posted January 27, 2015 The OnDestroy event is called when Session closed ! On Terminated or just browserClose(without Terminate) in both cases, the Session will close after "SessionTimeOut" ! and if the SessionTimeOut a few minutes , it's will Destroy after few minutes. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 27, 2015 Administrators Share Posted January 27, 2015 On Terminated or just browserClose(without Terminate) in both cases, the Session will close after "SessionTimeOut" ! and if the SessionTimeOut a few minutes , it's will Destroy after few minutes. Yes, these are the expected behaviors. Quote Link to comment Share on other sites More sharing options...
maher Posted February 4, 2015 Author Share Posted February 4, 2015 Asalam alykom, Let me remind that OnDestroy event is not called immediately. It is called a few seconds later. I test this case . On "Terminate" the OnDestroy called immediately. when Terminated used "UniSession.Terminate();" it's work. But by set MainModule->TerminateOnBrowserClose -> True did not!!!! Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 4, 2015 Administrators Share Posted February 4, 2015 Please send a simple project and steps you use to reproduce this behavior. Quote Link to comment Share on other sites More sharing options...
maher Posted February 4, 2015 Author Share Posted February 4, 2015 I think I found the reason why not called the TerminateOnBrowserClose I added some Js code in mainForm->Script function ounload(){ ......... }; It's working now Thnx Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 13, 2015 Share Posted February 13, 2015 Wa Alaykoum Essalam... Ahmed, Sincere greetings brothers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.