Recent

Author Topic: [solve] What does this warning mean? - ExCtrlsPkg  (Read 3294 times)

wp

  • Hero Member
  • *****
  • Posts: 12864
Re: What does this warning mean? - ExCtrlsPkg
« Reply #15 on: January 09, 2023, 10:54:15 pm »
Seems like your Lazarus installation is a mixup of different versions. You say that you have v2.2.4. But ImageList support that I can identify in your screenshot has been added to Laz/main only recently: this is part of the interface declaration of TCustomImage of Laz 2.2.4:
Code: Pascal  [Select][+][-]
  1.   { TCustomImage }
  2.  
  3.   TCustomImage = class(TGraphicControl)
  4.   private
  5.     FAntialiasingMode: TAntialiasingMode;
  6.     FOnPictureChanged: TNotifyEvent;
  7.     FOnPaintBackground: TImagePaintBackgroundEvent;
  8.     FPicture: TPicture;
  9.     FCenter: Boolean;
  10.     FKeepOriginXWhenClipped: Boolean;
  11.     FKeepOriginYWhenClipped: Boolean;
  12.     FProportional: Boolean;
  13.     FTransparent: Boolean;
  14.     FStretch: Boolean;
  15.     FStretchOutEnabled: Boolean;
  16.     FStretchInEnabled: Boolean;
  17.     FUseAncestorCanvas: boolean;
  18.     FPainting: boolean;
  19.     function  GetCanvas: TCanvas;
  20.     procedure SetAntialiasingMode(AValue: TAntialiasingMode);
  21.     procedure SetPicture(const AValue: TPicture);
  22.     procedure SetCenter(const AValue : Boolean);
  23.     procedure SetKeepOriginX(AValue: Boolean);
  24.     procedure SetKeepOriginY(AValue: Boolean);
  25.     procedure SetProportional(const AValue: Boolean);
  26.     procedure SetStretch(const AValue : Boolean);
  27.     procedure SetStretchInEnabled(AValue: Boolean);
  28.     procedure SetStretchOutEnabled(AValue: Boolean);
  29.     procedure SetTransparent(const AValue : Boolean);
  30.   protected
  31.   ....
and this the TCustomImage of Laz/main:
Code: Pascal  [Select][+][-]
  1.   TCustomImage = class(TGraphicControl)
  2.   private
  3.     FAntialiasingMode: TAntialiasingMode;
  4.     FImageIndex: Integer;
  5.     FImages: TCustomImageList;
  6.     FImageWidth: Integer;
  7.     FOnPictureChanged: TNotifyEvent;
  8.     FOnPaintBackground: TImagePaintBackgroundEvent;
  9.     FPicture: TPicture;
  10.     FCenter: Boolean;
  11.     FKeepOriginXWhenClipped: Boolean;
  12.     FKeepOriginYWhenClipped: Boolean;
  13.     FProportional: Boolean;
  14.     FTransparent: Boolean;
  15.     FStretch: Boolean;
  16.     FStretchOutEnabled: Boolean;
  17.     FStretchInEnabled: Boolean;
  18.     FUseAncestorCanvas: boolean;
  19.     FPainting: boolean;
  20.     function  GetCanvas: TCanvas;
  21.     function GetHasGraphic: Boolean;
  22.     procedure SetAntialiasingMode(AValue: TAntialiasingMode);
  23.     procedure SetImageIndex(const AImageIndex: Integer);
  24.     procedure SetImages(const AImages: TCustomImageList);
  25.     procedure SetImageWidth(const AImageWidth: Integer);
  26.     procedure SetPicture(const AValue: TPicture);
  27.     procedure SetCenter(const AValue : Boolean);
  28.     procedure SetKeepOriginX(AValue: Boolean);
  29.     procedure SetKeepOriginY(AValue: Boolean);
  30.     procedure SetProportional(const AValue: Boolean);
  31.     procedure SetStretch(const AValue : Boolean);
  32.     procedure SetStretchInEnabled(AValue: Boolean);
  33.     procedure SetStretchOutEnabled(AValue: Boolean);
  34.     procedure SetTransparent(const AValue : Boolean);
  35.   protected
  36.   ...
Compare with your screenshot.

You should not mix units from different Lazarus versions, this is possible only in very rare cases.

Use a clean installation of Laz 2.2.4 or, if you need new features or bug fixes, use an installation of Laz/main or Laz/fixes. If you don't know how to build these from the sources, take advantage of FPCUpDeluxe.

Nicole

  • Hero Member
  • *****
  • Posts: 1165
Re: What does this warning mean? - ExCtrlsPkg
« Reply #16 on: January 10, 2023, 05:31:33 pm »
I am puzzled by Panel and component and sorry for the mess, I am afraid it comes from my head.
In the meanwhile I reverted to a snapshot without problems and tried again: with the same problems.

There are 2 problems:
1)
the header of the panel, which does not allow to be set to VertAlign.
I tried with both kind of files 2.2.2 and 2.2.4 (my current installation).
These 2 files I overwrote were the extctrsl.pp and the custompanel.inc

Overwriting within 2.2.4 failed with both sources, those of 2.2.2 (which sounds logic) as well with 2.2.4 which I found here.
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.2.4/
https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/

2)
The component: I tried just to install the new version as you suggested, I was warned and made the mistake to hit "accept risk".
This second installation by the version of the pkg was a mistake.
I do not know, how to solve it. "just install" is wrong.

At the moment I have installed the v8670 cor the exctrl package with the above mentioned warning again.

In other words:
I am afraid, that I am glad to are at least back at the start of both of my problems, at least the IDE compiles again.
What are my dream:
- get back lots of my layout by placing the caption of my panels back again at the top
- getting rid of the warning of the component

wp

  • Hero Member
  • *****
  • Posts: 12864
Re: What does this warning mean? - ExCtrlsPkg
« Reply #17 on: January 10, 2023, 07:30:43 pm »
In the meanwhile I reverted to a snapshot without problems and tried again: with the same problems.
Which snapshot? A snapshot of Lazarus, or a snapshot of ExtCtrlsPkg?

These 2 files I overwrote were the extctrsl.pp and the custompanel.inc

Overwriting within 2.2.4 failed with both sources, those of 2.2.2 (which sounds logic) as well with 2.2.4 which I found here.
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.2.4/
https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/
I don't understand what you are doing exactly. It looks as if you were copying files from the main Laz branch over files in the Lau release version - this will not work in general because the files from the main version may contain many changes which depend on other changes in the main branch, and you don't have them in the release version.

In the other thread, I am attaching a special patched version of extctrls.pp and custompanel.inc which is taken from the v2.2.4 release and I put in only the changes needed for the VertAlignment property.

The component: I tried just to install the new version as you suggested, I was warned and made the mistake to hit "accept risk".
This second installation by the version of the pkg was a mistake.
I do not know, how to solve it. "just install" is wrong.
Now you are talking of the ExtCtrls package, don't you? (Difficult to distinguish between exctrls and extctrls...) If my assumption that you copied Laz/main files into a Laz 2.2.4 installation is correct, this will not work.

My proposal to fix everything:
- Copy the patched files over your 2.2.4 installation. Rebuild the IDE. If it does not build reinstall Lazarus 2.2.4 and begin from the start. Check whether the VertAlignment property works
- Install the new version of the ExtCtrls package.

Nicole

  • Hero Member
  • *****
  • Posts: 1165
Re: What does this warning mean? - ExCtrlsPkg
« Reply #18 on: January 10, 2023, 08:00:49 pm »
Sorry for the uncleanness: I was talking about the snapshot of the ExCtrlsPkg-package.

The panel thing works finally, thank you so much!

What is a thing I am insecure, is about the ExCtrlsPkg .
I downloaded a version r8671.
And I have installed a version already.
On installing it, I saw many warnings, as "does not contain any visual components".

Shall I "install" the r8671 or shall I just copy it's files above the previous version and re-compile the IDE?
With tvPlanit I used to do it and it worked fine in the past.

wp

  • Hero Member
  • *****
  • Posts: 12864
Re: What does this warning mean? - ExCtrlsPkg
« Reply #19 on: January 10, 2023, 08:16:05 pm »
On installing it, I saw many warnings, as "does not contain any visual components".
Strange - I don't see them. The runtime package (ExCtrlPkg) should compile with only deprecation warnings (and two from spinex.pp). There will be a dialog if you attempt to compile the designtime package (ExCtrlPkg_dsgn) ("Package "ExCtrlsPkg_dsgn" is designtime only, so it should only be compiled into the IDE, and not with the project settings."). Rather than clicking "Compile" do "Use" > "Install" here, and this message will not appear.

Shall I "install" the r8671 or shall I just copy it's files above the previous version and re-compile the IDE?
With tvPlanit I used to do it and it worked fine in the past.
Yes, copy the new package files over the old ones, that's fine, I do it all the time. Recompile the IDE (in many cases you don't have to do that...). If the IDE does not compile successfully do the "Tools" > "Configure Build Lazarus" > "Clean all" trick which erases all old compiled units first before compiling them anew.
« Last Edit: January 10, 2023, 08:22:00 pm by wp »

Nicole

  • Hero Member
  • *****
  • Posts: 1165
Re: What does this warning mean? - ExCtrlsPkg
« Reply #20 on: January 11, 2023, 12:11:21 pm »
all refers to "ExCtrlsPkg"

I did the overwrite thing.

Before I tried an uninstall and a re-install, but it did not work, not even with "clean all".
I could compile the new version, but "install" was greyed out.

So I reverted my VM to the last working snapshot and have now a name of one version and the content of the other.
I placed a text-file into the directory, which shall remember me about this fact.

Is there a way to rename an installed component-directory?

wp

  • Hero Member
  • *****
  • Posts: 12864
Re: What does this warning mean? - ExCtrlsPkg
« Reply #21 on: January 11, 2023, 01:51:54 pm »
all refers to "ExCtrlsPkg"

I could compile the new version, but "install" was greyed out.
Yes, "ExCtrlsPkg" is the runtime package, you cannot "install" a runtime package. The package that you must "install" is "ExCtrlsPkg_dsgn".

The reason behind the separation is that only the IDE needs the component palette icons or the property editors for the object inspector - all this is in the designtime package. The runtime package, on the other hand, contains only the "pure" component code which is needed by your application.

Is there a way to rename an installed component-directory?
Simply reinstall the package from the new directory. The IDE will search the component in the directory of the last installation.
« Last Edit: January 11, 2023, 01:57:53 pm by wp »

Nicole

  • Hero Member
  • *****
  • Posts: 1165
Re: What does this warning mean? - ExCtrlsPkg
« Reply #22 on: January 11, 2023, 06:07:29 pm »
thanks.
I'll take a snaphot before, ;-)

Nicole

  • Hero Member
  • *****
  • Posts: 1165
Re: What does this warning mean? - ExCtrlsPkg
« Reply #23 on: January 11, 2023, 07:05:33 pm »
Finally it worked. It took hours. I had to change the search paths and re-compile and

... let's look at the bright side:
The organization of componentes and their names looks logic now.

Thank you!

 

TinyPortal © 2005-2018