Jump to content

maher

uniGUI Subscriber
  • Posts

    116
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by maher

  1. 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. Asalam alykom, 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!!!!
  3. Hello, I did some debugs and I found that: if you create objects on MainModule.Create it will distroy the object automatically when the session closed and the objects will destroy before MainModule.destroy called.
  4. Hello, I create some objects (classes) When MainModule.Create. When I try to free and nil these objects on MainModule.destroy the app freezes and doesn't respont, any idea? For example , I Create a DataModule that Containing all db components and functions.
  5. 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.
  6. Yes. Even when Call UniSession.Terminate(); "UniGUIMainModuleDestroy" not executed
  7. 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
  8. محمد وعيسى صلى الله عليهم وسلم . Mohammed and Jesus God bless them. Happy new year peace
  9. Alsalam alykom. I implemented the your sample , I get an error : "E2010 Incompatible types: 'MainModule.TUniPlatforms' and 'uniGUIApplication.TUniPlatforms' " On The Line : " U := UniSession.UniPlatform; Can you give a full sample Thanx
  10. uniPlatform : [ ] What are the values ​​that it should contain?
  11. Thanks for the quick reply I want get the Platform or (Client Info) when creating the MainModule . The aim is to define different variables for each Platform!, before show the login form!!!!
  12. How Can use UniPlatform? Before the MainModule Created Thanx
  13. Thank to Oliver Morsch & ZigZig I want to send message used unigui only . I solved the problem in a primitive method, but it's work fine If there is a better solution please share begin USession := TUniGUISession(ASessionList[i]); M := USession.UniMainModule as TUniMainModule; if M.username = 'ThisUserName' then begin M.LMessageStr := 'Your Session will Terminate after 10 Sec !!!';////// <--- USession.TerminateAfterSecs(10); Break; end; end; // And in the MainForm. a Timer With this code: procedure TMainFrm.UniTimer1Timer(Sender: TObject); begin if UniMainModule.LMessageStr <> '' then begin ShowMessage(UniMainModule.LMessageStr); UniMainModule.LMessageStr := ''; end; end;
  14. Dear ZigZig The code that Farshad give WORK fine : When I login with username "XXXX" the application search the old Session with the same username "XXXX" and Terminate it I mean the application Terminate the "other Session" not MySession.... The system must sent to the "other Session" Message "The System will terminate after..... The Message Must sent to "USession := TUniGUISession(ASessionList)" Thanx var ASessionList: TList; I : Integer; M : TUniMainModule; USession : TUniGUISession; begin ASessionList := UniServerModule.SessionManager.Sessions.SessionList.LockList; try for I := 0 to ASessionList.Count -1 do begin USession := TUniGUISession(ASessionList[i]); M := USession.UniMainModule as TUniMainModule; if M.username = 'ThisUserName' then begin USession.TerminateAfterSecs(0); Break; end; end; finally UniServerModule.SessionManager.Sessions.SessionList.UnlockList; end; end; This may help.
  15. Thanks ZigZig for the reply, But i used callback procedure. ( a procedure to show message on the target Session) it did not work.!
  16. .... This Code is Work fine but this code Will terminate Other USession without show any message to "Other USession" user Required to show a Message to the "Other USession"..... Like : if M.username = 'ThisUserName' then begin ....USession....(ShowMessage(' The System will terminate after 10 Sec')..... USession.TerminateAfterSecs(10); Thanx
  17. Right-to-Left (RTL) Demonstrates Ext JS support for right-to-left languages http://dev.sencha.com/ext/5.0.0/examples/rtl/rtl.html
  18. ماهر احمد صرصور - فلسطين "انا بعرف 2 غيري" انا منهم ؟
  19. Ramadan Kareem رمضان كريم
×
×
  • Create New...