[Lazarus] WriteLn back to the GUI

ListMember listmember at letterboxes.org
Wed Oct 23 23:29:11 CEST 2013


On 2013-10-23 23:20, Hans-Peter Diettrich wrote:
> 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.

Thank you for that gem.

>> 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.

Have you looked at the code Sven linked to, or are you saying this just 
because it is the usual thing to say under these circumstances?

>> 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.

Again, rather than the high horse you seem to be riding (which even Sven 
doesn't, despite the fact that he is a compiler developer), thereby 
adding nothing of value to the solution of the problem, I'd appreciate 
it very much if you could offer focused help.




More information about the Lazarus mailing list