Jump to content
luciano_f

Wrong Formatting with Anonymous Thread in "Code Formatter""

Recommended Posts

Posted (edited)

See this example below.

No configuration can solve this problem

The problem is that the Procedure "P_LoopActive" has no margins and is glued to the left

Procedure TForm_MenuPrincipal.P_ActiveUDPServer(Op: Integer);
Var PortaUDP: Integer;
Var fThread_UDPServer: TThread;
Begin

   fThread_UDPServer := TThread.CreateAnonymousThread(Procedure
Procedure P_LoopAtive;
Var I: Integer;
Begin
 PortaUDP := vPorta_Refresh;

 For I := 1 To Count_SessionWindows Do Begin
  Try
   Server_Refresh.Active := False;
   Server_Refresh.DefaultPort := PortaUDP;
   Server_Refresh.BroadcastEnabled := True;
   Server_Refresh.ThreadedEvent := False;
   Server_Refresh.Active := True;
   break;
  Except
   On E: Exception Do Begin             // Não dar erro aleatorios no Terminal Server
    Inc(PortaUDP);

    FreeAndNil(Server_Refresh);

    Server_Refresh := TIdUDPServer.Create(self);
    Server_Refresh.OnUDPRead := Server_RefreshUDPRead;

    P_LogException(E);
   End;
  End;
 End;
End;

   Begin
    If Op = 0 Then
     P_LoopAtive;

    If Op = 1 Then Begin
     Try
      Server_Refresh.Active := True;
     Except
      P_LoopAtive;
     End;
    End;
   End);
  fThread_UDPServer.FreeOnTerminate := True;
  fThread_UDPServer.Start;

End;

 

Edited by luciano_f

Share this post


Link to post

Please create a bug report on SourceForge.

Share this post


Link to post
On 5/22/2024 at 12:35 PM, dummzeuch said:

Please create a bug report on SourceForge.

 

Hello everything is fine.

Was my colleague able to analyze it ?

I'm having to use Delphi's native Formated but it's very slow.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×