andyhill Posted March 30, 2020 Share Posted March 30, 2020 I have spent 3 and a half years exclusively in the UniGUI Mobile world where most things work after effort and today tried to build the most simplest Desktop App with a Login Form and Thread Timer. I cannot get the Thread Timer Event to call the fLogin Form Ajax Event ? Please advise - Thanks procedure TfLogin.ttTimeOutTimer(Sender: TObject); begin ttTimeOut.Enabled:= False; WaitFlag:= False; // Below Fails (along with about 10 other variants of calling) UniSession.AddJS('ajaxRequest(fLogin.window, "_TimerReset_", []'); UniSession.AddJS('ajaxRequest(' + fLogin.Form + ', "_TimerReset_", []'); UniSession.AddJS('ajaxRequest(' + fLogin.WebForm.JSName + ', "_TimerReset_", []'); UniSession.AddJS('ajaxRequest(' + Chr(39)+fLogin.GetWebForm.Name+Chr(39) + ', "_TimerReset_", []'); end; procedure TfLogin.UniLoginFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_TimerReset_' then begin Caption:= 'Login'; UniSession.Synchronize(); end; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 30, 2020 Share Posted March 30, 2020 1 hour ago, andyhill said: I cannot get the Thread Timer Event to call the fLogin Form Ajax Event ? Please advise - Thanks "TuniThreadTimer is a server side timer. It runs in server in its own thread and has no connection to client side. It is not bound to any session. It can be used to run server side tasks and other internal tasks." Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 30, 2020 Author Share Posted March 30, 2020 Of course, silly me, "I could not see the trees from the woods" 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.