Recent

Author Topic: The error occurs if the fpsallformats module is not added.  (Read 2184 times)

dvigor

  • New member
  • *
  • Posts: 8
The error occurs if the fpsallformats module is not added.
« on: February 03, 2022, 09:00:50 am »
The error occurs if the fpsallformats module is not added. The application compiles and runs.

Maybe someone else will look for the cause ...

PascalDragon

  • Hero Member
  • *****
  • Posts: 5466
  • Compiler Developer
Re: The error occurs if the fpsallformats module is not added.
« Reply #1 on: February 03, 2022, 09:08:47 am »
FPSpreadsheet itself doesn't contain the readers/writers for the document formats, they are contained in separate units. Thus you need to either use them separately (in case of xlsx it's xlsxooxml) or you can use fpsallformats which simply registers all formats that FPSpreadsheet supports. This is by design and not an error.

dvigor

  • New member
  • *
  • Posts: 8
Re: The error occurs if the fpsallformats module is not added.
« Reply #2 on: February 03, 2022, 12:18:22 pm »
Thanks, for some reason the module was spontaneously removed from the list uses. For a long time I could not find the reason for this behavior.
« Last Edit: February 03, 2022, 12:21:07 pm by dvigor »

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: The error occurs if the fpsallformats module is not added.
« Reply #3 on: February 03, 2022, 01:15:45 pm »
Maybe you did it yourself and were not aware of its consequences.

The IDE highlights this unit and classifies it as "unused". In fact, it does not contain any code and thus there is nothing which can be called from your project. That's true. But it is not "useless". It adds all fpspreadsheet reader/writer units to its uses clause, and this has the effect that their initialization code is executed and registers the reader/writer classes in your project.

The IDE hint about "unused" units, however, is correct in most of the cases nevertheless. For example when you added a component to a form but later deleted the component again. In this case the unit of the component remains in the uses clause and really becomes "unused".

So think twice when you remove an "unused" unit.

dvigor

  • New member
  • *
  • Posts: 8
Re: The error occurs if the fpsallformats module is not added.
« Reply #4 on: February 04, 2022, 08:51:17 am »
Thank you. You are absolutely right.

 

TinyPortal © 2005-2018