Recent

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

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1278
  • 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 »
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

Cyrax

  • Hero Member
  • *****
  • Posts: 839
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: 1278
  • 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.
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1278
  • 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 »
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1278
  • 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 »
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1278
  • 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
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2561
    • 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1278
  • 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?
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

Cyrax

  • Hero Member
  • *****
  • Posts: 839
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: 1278
  • 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.
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018