[Lazarus] WriteLn back to the GUI
Anton Kavalenka
anton.k at tut.by
Wed Oct 23 17:37:27 CEST 2013
On 23.10.2013 09:59, ListMember wrote:
> Hello,
>
> I am trying to find where WriteLn is declared; but, apparently,
> WriteLn is among the select few that Lazarus will ignore 'Find
> Declaration' requests --at least that's how it behaves (latest Lazarus
> stable) on my side.
>
> My ultimate goal, after finding where it is declared, is to locally
> modify that part of the sources so that (instead of writing to the
> console) it will use a global callback to display whatever WriteLn'ed
> in a TMemo.
>
> Or, is there already an alternative to redirect console output to the
> running GUI?
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
There was already a discussion on this maillist - try to search
"[fpc-devel] StdOut capture for FPC RTL"
It is possible to create pipe, replace TextRec(output).Handle with pipe
handle and rewrite() that output.
Gui thread just reads from the read end of the pipe and updates via
Syncronize() whatever you want (memo, or even synedit).
But you need to rewrite output for every thread you start later.
regards,
Anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131023/1fde1ba0/attachment-0003.html>
More information about the Lazarus
mailing list