Recent

Author Topic: Where are the components? [SOLVED]  (Read 1259 times)

Badger

  • Full Member
  • ***
  • Posts: 144
Where are the components? [SOLVED]
« on: February 06, 2023, 05:51:54 am »
I have downloaded fpspreadsheet and added the package to my application via Project Inspector>Add>New Requirement.
However, I just can't find sWorkbookSource or sWorkbookTabControl in the component palette.
Obviously I'm doing somethisg wrong - but what?   
« Last Edit: February 06, 2023, 11:56:13 pm by Badger »
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 10 Lazarus v2.4.4  FPC 3.2.2   Win 32/64

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Where are the components?
« Reply #1 on: February 06, 2023, 05:59:13 am »
@Badger:
You are required to install the package, see https://wiki.lazarus.freepascal.org/Install_Packages

But it is probably easier to use OPM, see https://wiki.freepascal.org/Online_Package_Manager

Badger

  • Full Member
  • ***
  • Posts: 144
Re: Where are the components?
« Reply #2 on: February 06, 2023, 07:57:25 am »
If I use the Install_Packages method, the Use>Install menu item is not enabled.
If I use the Online Packet Manager I get an error Cannot install package: "laz_fpspreadsheeet.lpk".  Continue with next one.  This is repeated for each file.
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 10 Lazarus v2.4.4  FPC 3.2.2   Win 32/64

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Where are the components?
« Reply #3 on: February 06, 2023, 08:04:11 am »
hmz, that sounds like either a question for the author of fpspreadsheet and/or OPM manager (or both)

But before doing so: where did you obtain the package from ? (link please)

Badger

  • Full Member
  • ***
  • Posts: 144
Re: Where are the components?
« Reply #4 on: February 06, 2023, 08:13:58 am »
Downloaded from sourceforge
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 10 Lazarus v2.4.4  FPC 3.2.2   Win 32/64

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Where are the components?
« Reply #5 on: February 06, 2023, 08:20:47 am »
Downloaded from sourceforge
Unfortunately naming the website is not enough. There are forks floating around. Not only that but in my experience source-code from lazarus packages from sourceforce do not match the source-code in the packages from OPM.

OPM downloads from the original repository and which is specially crafted for/supported by Lazarus and therefor should work with OPM.

Since you have manually installed/extracted the package on your earlier attempt (project use), i wonder if that perhaps conflicts when trying to install the package by the IDE package install method (I honestly have no idea).

edit: also important to know is version of FPC and Lazarus and platform you try this on (we can't trust a signature)
« Last Edit: February 06, 2023, 08:27:11 am by TRon »

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Where are the components?
« Reply #6 on: February 06, 2023, 08:50:13 am »
edit: also important to know is version of FPC and Lazarus and platform you try this on (we can't trust a signature)
Badger mean he is using Lazarus 2.0.10 (11. Juli 2020 with ev. fpc 3.2.0 if upgraded). If true, there can be a problem with the the used version of fpc and lazarus.

OPM is working well on the actual stable of fpc and lazarus (Normal on the last stable too). And you have to remove the old not working components from the packagelist (and the files). Such mix of OPM and not working installation, can only make the things more worse.
regards
Andreas

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: Where are the components?
« Reply #7 on: February 06, 2023, 09:49:16 am »
I have downloaded fpspreadsheet and added the package to my application via Project Inspector>Add>New Requirement.
However, I just can't find sWorkbookSource or sWorkbookTabControl in the component palette.
Obviously I'm doing somethisg wrong - but what?

Did you read "install.txt" in fpspreadsheet folder?

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: Where are the components?
« Reply #8 on: February 06, 2023, 11:17:05 am »
If I use the Install_Packages method, the Use>Install menu item is not enabled.
Yes - that's the way it should be...

Basically there are two types of packages: runtime packages and designtime packages.
  • Runtime packages are just a collection of units which you can "use" in your project. They have no effect on the IDE, and they cannot be "installed". The IDE only needs to know where they can be found, and this information is provided when you open such a package in "Package" > "Open Package File (.lpk)". To verify that the package is compiling you can click on "Compile", but this is not absolutely necessary.
  • Designtime packages provide code which modifies the IDE: by registration of components for the component palette, by providing special property or component editors (used by the object inspector), or by providing IDE add-ons. These packages MUST be installed: Open them via "Package" > "Open package file" and click "Use" > "Install". This rebuilds the IDE and links the package code to the IDE code.
To find out to which class a package belongs, open the package and look at the page "Option" > "IDE integration" (there are "combined" runtime+designtime packages - they must be installed, too).

FPSpreadsheet is split into several packages because not every user needs the full functionality:
  • laz_fpspreadsheet.lpk is the basic package containing the spreadsheet datastructures and the file read/write access units. A runtime package.
  • laz_fpspreadsheet_visual.lpk: runtime package containing the visual spreadsheet controls (worksheet grid etc).
  • laz_fpspreadsheet_visual_dsgn.lpk: designtime package for the visual controls, registering them on the component palette.
  • laz_fpspreadsheet_crypto.lpk: runtime package for access to password-protected Excel files, depends on the DCPCrypto package
  • laz_fpspreadsheet_dataset.lpk: allows to access spreadsheets by database technology. Designtime/runtime package
  • laz_fpspreadsheetexport_visual.lpk: components for database export. Depends on lazdbexport. Designtime/runtime package

If I use the Online Packet Manager I get an error Cannot install package: "laz_fpspreadsheeet.lpk".  Continue with next one.  This is repeated for each file.
Cannot confirm this, just installed FPSpreadsheet to Laz 2.0.10 via OPM; there was only a message about the unresolved dependence on DCPCryped (required by the laz_fpspreadsheet_crypto package) - you can proceed with the next package for installation if you do not need to handle password-protected Excel files, or you abort the installation and check DCPCrypt in addition to FPSpreadsheet for installation in OPM.

Badger

  • Full Member
  • ***
  • Posts: 144
Re: Where are the components?
« Reply #9 on: February 06, 2023, 11:52:44 pm »
I deleted all previous spreadsheet files, updated my Lazarus and FPC versions, read the install.text file (If all else fails - read the instructions) and everything worked fine.

Thanks all for the help.
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 10 Lazarus v2.4.4  FPC 3.2.2   Win 32/64

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Where are the components? [SOLVED]
« Reply #10 on: February 07, 2023, 06:46:18 am »
@af0815
Thank you for that as I did not noticed the odd combination possibility.

I was aware that fpspreadsheet works as expected on stable.

@wp:
Thank you for the explanation about non visual packages. That thought never crossed my mind. In fact I have never seen that before because I never ran into it myself (so I did not know that 'greyed out feature' even existed). And no I am not /that/ good, I just hardly install any 3th party Lazarus packages that way.

 

TinyPortal © 2005-2018