Jump to content

How to call "UniGUIMainModuleDestroy" on Terminate?


Recommended Posts

Posted

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

 

 

 

 

 

Posted

Yes.

Even when Call  UniSession.Terminate();

 

"UniGUIMainModuleDestroy"   not executed

Posted

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.

  • Administrators
Posted

 

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.

Posted

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!!!!

Posted

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  
 

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...