Thread update IWLabel

<< Click to Display Table of Contents >>

Navigation:  Forum >

Thread update IWLabel

Forum link

 


 

11-13-2020, 09:20 AM:

 

In have (VCL version) thread for update statusbar

 

How update code for IW with update IWLabel? IWLabel1.Caption .... Access Error!

 

VCL code:

 

procedure TMyThread.Execute;

 

begin

 

while not Terminated do

 

begin

 

          if Terminated then

 

          begin

 

            Synchronize(

 

              procedure

 

              begin

 

                MainForm.StatusBar1.Panels.Items[0].Text := 'Load Ending! ';

 

              end

 

              );

 

            Break;

 

          end; // if terminated

 

Synchronize(

 

                    procedure

 

                    begin

 

                      MainForm.StatusBar1.Panels.Items[0].Text := 'Loading... ';

 

                    end

 

                    );

 

end; // while

 

end;

 


 

11-13-2020, 05:47 PM:

 

You cant use Synchronize in a server app. IW is already threaded, there is no main thread except in SA UI, and the main thread is for the server side UI.

 

In our demos is a demo showing how to create a secondary thread for a user session and provide a status bar update.

 


 

11-16-2020, 06:32 AM:

 

(11-13-2020, 05:47 PM)kudzu Wrote: [ -> ]You cant use Synchronize in a server app. IW is already threaded, there is no main thread except in SA UI, and the main thread is for the server side UI.

 

In our demos is a demo showing how to create a secondary thread for a user session and provide a status bar update.

 

Which demo?

 


 

11-16-2020, 03:32 PM:

 

(11-16-2020, 06:32 AM)matija Wrote: [ -> ] (11-13-2020, 05:47 PM)kudzu Wrote: [ -> ]You cant use Synchronize in a server app. IW is already threaded, there is no main thread except in SA UI, and the main thread is for the server side UI.

 

In our demos is a demo showing how to create a secondary thread for a user session and provide a status bar update.

 

Which demo?

 

https://github.com/Atozed/IntraWeb/tree/...i/Features

 


 

11-17-2020, 07:06 AM:

 

(11-16-2020, 03:32 PM)PaulWeem Wrote: [ -> ] (11-16-2020, 06:32 AM)matija Wrote: [ -> ] (11-13-2020, 05:47 PM)kudzu Wrote: [ -> ]You cant use Synchronize in a server app. IW is already threaded, there is no main thread except in SA UI, and the main thread is for the server side UI.

 

In our demos is a demo showing how to create a secondary thread for a user session and provide a status bar update.

 

Which demo?

 

https://github.com/Atozed/IntraWeb/tree/...i/Features

 

Thx