[Lazarus] WriteLn back to the GUI

ListMember listmember at letterboxes.org
Thu Oct 24 20:02:32 CEST 2013

On 2013-10-24 06:45, Hans-Peter Diettrich wrote:
> I'd suggest that you write an file driver first, to get familiar with 
> the functions to implement. Play around using an file buffer, or with 
> direct file I/O. Then it should be easier to replace the file by 
> another (GUI) component, in the next step. If you have problems with 
> that code, you can look up the RTL implementation of such I/O.
> Next comes a decision of direct (write-through) or buffered output. 
> When the output goes into a Memo like control, I'd simply append all 
> output immediately to memo.Text. AFAIR I ended up using a TStrings 
> object, as obtainable from e.g. a ListBox, and implemented line 
> buffering capabilities. In this case only full lines (up to EOL, or 
> when the buffer is filled entirely) are added to the TStrings object 
> and removed from the buffer.
> Bidirectional (console-like?) I/O deserves more considerations, if you 
> want to implement something like that.
I am sure what you've described does make sense, but I wonder if you 
ever stood back to see that all of it appears much like a recommendation 
to use smoke signalling techniques (or hire someone proficient) just 
because one wants to communicate _today_ with a person of indigeneous 

What is worse, and what makes this rant almost absolutely pointless, is 
the fact that you're not responsible for any of it.

More information about the Lazarus mailing list