Recent

Author Topic: [SOLVED] Cannot create component methods (macOS)  (Read 2178 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
[SOLVED] Cannot create component methods (macOS)
« on: March 02, 2020, 06:35:24 am »
No idea what caused this, but CodeTools is unhappy and will not let me create any methods for any components in an existing project (new and other existing projects are ok).

See attached images for the error produced when trying to add a method.

Any ideas?
« Last Edit: May 11, 2020, 02:00:47 pm by trev »

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Cannot create component methods (macOS)
« Reply #1 on: March 02, 2020, 07:51:07 am »
If I recall, this was fixed at the FPC trunk. Please update your copy to latest one.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #2 on: March 02, 2020, 01:04:51 pm »
Thanks! That fixed it.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #3 on: March 02, 2020, 01:25:28 pm »
I spoke too soon :(

I still cannot create new methods. See attached image of the errors.
« Last Edit: March 02, 2020, 01:27:10 pm by trev »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #4 on: March 02, 2020, 01:33:09 pm »
I can create new methods for new projects (simple form test), but I cannot create new methods for any existing projects.

[Update]

I've narrowed it down further. I cannot create new form methods in any existing project; creating methods for other components is fine.
« Last Edit: March 02, 2020, 02:08:24 pm by trev »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #5 on: March 02, 2020, 02:29:34 pm »
Code: [Select]
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
  Classes, Forms, MacOSAll, CocoaAll;
type
  { TForm1 }
  TForm1 = class(TForm)
  private
  public
  end;
var
  Form1: TForm1;
implementation
{$R *.lfm}
end.   

The above unit is enough to trigger the problem. The error always opens the AudioComponents.pas file and complains of this error: (703,131) Error: expected =, but ; found

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Cannot create component methods (macOS)
« Reply #6 on: March 02, 2020, 02:43:12 pm »
seems like CodeTools are not support C-blocks related syntax

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #7 on: March 03, 2020, 03:14:57 am »
Do I need to do anything? Lodge a bug?

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Cannot create component methods (macOS)
« Reply #8 on: March 03, 2020, 03:39:06 am »
Do I need to do anything? Lodge a bug?

Yes, please. And with short demo project, if you can.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Cannot create component methods (macOS)
« Reply #9 on: March 03, 2020, 07:49:39 am »
Done. See https://bugs.freepascal.org/view.php?id=36752 with trivial demo project.

 

TinyPortal © 2005-2018