* * *

Author Topic: LCL / VCL extensions/corrections  (Read 1008 times)


  • Newbie
  • Posts: 3
    • Frédéric Libaud, Expert en Numérique
LCL / VCL extensions/corrections
« on: September 30, 2017, 11:09:41 am »

I've saw some bugs on LCL TFileStream class, like Position property that have some bug for me. I don't explain this behaviour but accessing this make error like SIGSEV.

In fact I've sub-classed this with a new TCorrectedFileStream how implement too some functionality how will be useful aka EOF property.

You could find it on Github : github.com/Libaud/Pascal-Object-LCL-VCL-Corrections-Extensions .

I will add some other extensions and corrections in the future only on this library.
Frédéric Libaud, Digital Expert

Europe, France, Pays-de-Loire, Loire-Atlantique



  • New member
  • *
  • Posts: 48
Re: LCL / VCL extensions/corrections
« Reply #1 on: September 30, 2017, 03:46:42 pm »
I've looked into your code. No offense, but claiming that the proposed code is a fix for TFileStream is a bold statement. You are mixing the types Integer (your implementation) and Int64 (the inherited TStream.Seek call), so you have introduced an extra problem.

What caught my attention is that comment from your source code: "In LCL (Lazarus 1.2.6), property Position doesn't work correctly". Is it really about the 1.2.6 version, or it is just a typo? But if not a typo, then why don't you try upgrading?

And if you really want to give something to the public, then I believe creating a bug report for the TFileStream bug is much, much better option than providing some descendant class. Fixing that root cause in TFileStream will make more people happy.



Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus