[Lazarus] WriteLn back to the GUI

Marco van de Voort marcov at stack.nl
Wed Oct 23 20:11:48 CEST 2013


On Wed, Oct 23, 2013 at 09:59:04AM +0300, ListMember wrote:
> 
> 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.

There is no source of writeln, it is split up into various calls by the
compiler. However in the end those writeln routines write a string, and that
routine can be redirected.

Have a look at fpc/packages/streamio.pp

Running assignstream() on "output" would redirect all normal writeln output
to the stream that is the second parameter.




More information about the Lazarus mailing list