[Lazarus] WriteLn back to the GUI

Sven Barth pascaldragon at googlemail.com
Thu Oct 24 10:08:36 CEST 2013


Am 24.10.2013 09:58, schrieb Hans-Peter Diettrich:
> Sven Barth schrieb:
>> Am 23.10.2013 23:08, schrieb ListMember:
>
>> Did you read (and understand) what I wrote? You need to "store the 
>> old value of "Output" and restore" it afterwards.
>
> IMO it's not a good idea to change Input and Output on the fly. 
> Problems can result e.g. from unprocessed characters hanging in the 
> buffers.
>
> Even for testing purposes I'd suggest to use explicit files in the 
> Read/Write statements.
The buffer is part of the Input/Output variable. So if you change one of 
them the content of the buffer will still be there, but simply not 
processed. You could always do a "FlushFile(Output)" to clear the buffer 
before changing it however. I see no problem here.

Regards,
Sven




More information about the Lazarus mailing list