Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread update IWLabel
#1
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;
Reply
#2
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.
Reply
#3
(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?
Reply
#4
(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
Reply
#5
(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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)