Recent

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

trev

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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 »
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Cyrax

  • Hero Member
  • *****
  • Posts: 815
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

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 10.2 User
Re: Cannot create component methods (macOS)
« Reply #2 on: March 02, 2020, 01:04:51 pm »
Thanks! That fixed it.
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

trev

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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 »
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

trev

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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 »
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

trev

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2461
    • 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
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

trev

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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?
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Cyrax

  • Hero Member
  • *****
  • Posts: 815
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

  • Hero Member
  • *****
  • Posts: 718
  • Former Delphi 1-7 and 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.
o Lazarus v2.1.0 r63272, FPC v3.3.1 r45525, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

 

TinyPortal © 2005-2018