Jump to content

Oliver Morsch

uniGUI Subscriber
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by Oliver Morsch

  1. To stop sessions keep polling to get fresh data, how can one push messages to different session, is WebSocket is the only way to push messages to sessions?

     

    WebSocket is the best/modern way. But you can also use LongPolling.

     

    If a query is kept in ServerModule will that query result be shared by all sessions?

    No.

  2. Do we have to free the temporary  variable  Frm  ?

    Where to put  :   Frm.Free   ?

    Or is it automatically free  ?

     

     

    Set Form2.FreeOnClose to true; then it is automaticly freed. Otherwise you must use .Free in the callback procedure after doing your stuff.

    • Upvote 1
  3. So, Is there a way to use your leightweight technic also in a traditional callback show (synchonous = False) ?

     

    procedure TMainForm.UniButton2Click(Sender: TObject);
    var Frm: TUniForm1;
    begin
      Frm := TUniForm1.Create(UniApplication);
      Frm.ShowModal(
        procedure (Sender: TComponent; Res: Integer)
        begin
          if Res = mrOK then begin
            UniMemo1.Lines.Add(Frm.UniEdit1.Text);
          end else begin
            UniMemo1.Lines.Add('!Cancel!');
          end;
        end
      );
    end;
    
    • Upvote 1
  4. I think the problem is that a webapp always works with request -> response. No active request, no response possible.

     

    Due to the Async/Nowait you have: request -> response -> Callback function (but here is no request),

×
×
  • Create New...