[Lazarus] WriteLn back to the GUI

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Oct 23 22:20:34 CEST 2013

ListMember schrieb:

> Frankly, I agree that I should not have to modify the compiler or the 
> RTL; especially for something like redirecting the WriteLn output from 
> console to my own application.
> But, doing it through text drivers etc. is --how can I put it-- almost 
> inhuman.

It's basic OOP to derive classes from existing ones. Writing an text 
driver is exactly the same task, even if the "class" keyword is not used 
here - for historical reasons.

> But, why would I have to write 100+ lines of code just to capture the 
> output of WriteLn.

Then you're doing something very, very wrong.

> Plus, I keep getting segfaults when I close the application --something 
> is calling InOutFunc when the app closes and still tries to write to a 
> destroyed TMemo.

No wonder. You should understand what you have to implement, before 
writing bogus code.


More information about the Lazarus mailing list