RTC Forums
November 24, 2024, 07:27:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Accessing the GUI from events in MultiThreaded mode  (Read 4980 times)
zxplzzc
RTC Expired
*
Posts: 8


« on: November 12, 2011, 09:24:03 AM »

How can I  write the following codes correctly?
procedure TMainForm.RtcHttpClient1ConnectError(Sender: TRtcConnection;E: Exception);
begin
  if not Sender.inMainThread then
     Sender.Sync(RtcHttpClient1ConnectError);
  else
  begin
    RzStatusPane1.Caption:=E.Message;
  end;
end;

Thanks!
Logged
zxplzzc
RTC Expired
*
Posts: 8


« Reply #1 on: November 12, 2011, 09:51:39 AM »

I see:
  Sender.Sync(RtcHttpClient1ConnectError,E)
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #2 on: November 12, 2011, 10:23:57 AM »

Correct. The Sync method needs to be called with the event to be synchronized and all the parameters which that event is receiving, except "Sender".

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.