Recent

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

libaudf

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

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

http://www.libaudfrederic.fr

Mick

  • Jr. Member
  • **
  • Posts: 51
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.

 

TinyPortal © 2005-2018