Atozed Forums

Full Version: Thread update IWLabel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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;
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-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, 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-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