Recent

Author Topic: Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work  (Read 2451 times)

six1

  • Full Member
  • ***
  • Posts: 117
Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work
« on: November 01, 2021, 11:00:31 am »
Hi,
installation fails in Line 186 in File BCGameGrid.pas :

"CompareMethods" isn't found ...

(not CompareMethods(TMethod(Action.OnExecute), TMethod(FOnClickControl))) then

What's to do?

Regards, Michael

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work
« Reply #1 on: November 01, 2021, 11:13:32 am »
Testing with Laz 2.0.12 compilation works correctly, testing with Laz/main fails.

In 2.0.12 CompareMethods is in unit LCLProc. The git change log of lclproc.pas displays this suspicious entry on Oct 9 by Juha: "Rename CompareMethods to more logical SameMethod. Remove old deprecated functions.", and the diff of the old file of this commit says:

Quote
// Deprecated in 2.1 / 12.12.2020 / Remove in 2.3
function CompareMethods(m1, m2: TMethod): boolean; deprecated 'Use LazMethodList.CompareMethods';
[...]

I'm not sure whether removal of these deprecated methods is correct at the current time since v2.2 has not yet been released. But anyway: Adding unit LazMethodList to the uses clause of BCGameGrid will fix the compilation issue.

Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes, SysUtils, {$IFDEF FPC}LResources, LCLProc, LazMethodList, {$ENDIF} Types, Forms, Controls, Graphics, Dialogs,
  3.   [...]

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work
« Reply #2 on: November 01, 2021, 11:15:45 am »
That's in BGRAControls. It has been fixed recently on dev branch:
https://github.com/bgrabitmap/bgracontrols/commit/d0cdcec6e344fa530a95534a66f9299716754053

You can either:
- use the dev version
- apply the same change in your local file
- add the uses clause as suggested by wp

Regards

Conscience is the debugger of the mind

six1

  • Full Member
  • ***
  • Posts: 117
Re: Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work
« Reply #3 on: November 01, 2021, 11:17:39 am »
Huu, that was very quick!  ;)

I've added "LazMethodList" and it's working!
Thanks to both of you!

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Installing BGRABitmap with Laz 2.3.0 fpc 3.2.2 didn't work
« Reply #4 on: November 01, 2021, 04:39:35 pm »
You're welcome  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018