Skip to content

Callback for write on screen (WriteLn)  #48

Open
@davaponte

Description

@davaponte

It would be nice to provide a callback function to print the output messages in a GUI. For example, a TMemo. I mean the ones that are written with WriteLn.

For example:

  WriteLn
  (
    'Min/Max at 0:',  Min0:4:0,' ',Max0:4:0,
    ' at 1:', Min1:4:0,' ',Max1:4:0,
    ' at 2:', Min2:4:0,' ',Max2:4:0
  );

will be

S := Format('Min/Max at 0: %4.0f %4.0f at 1: %4.0f %4.0f at 2: %4.0f %4.0f', 
           [Min0, Max0, Min1, Max1, Min2, Max2]); 
SomeCallBack(S);

and, by default SomeCallBack point to a simple procedure with a WriteLn to don't break anything

procedure SomeCallBack(S: string);
begin
  WriteLn(S);
end;

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions