Problem compiling a GUI (form) with a TPSScript component on it. lazarus / 31-LCL ---------------------------------------------------------------------- jamie · 2021-09-06 01:04 I have reported an issue but I would like to know how others have done this ? I dropped a TPSScript component on the form, implemented the "OnProcessDirective" and I can not compile it because it has a duplicated "Active" parameter which matches a "Active" parameter in the TFORMS unit.  I really don't understand this because this Active parameter should not be causing hardship with the compiler due to where it is located. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, uPSComponent, uPSUtils, uPSPreProcessor; type   { TForm1 }   TForm1 = class(TForm)  PSScript1: TPSScript;    procedure PSScript1ProcessDirective(Sender: TPSPreProcessor;      Parser: TPSPascalPreProcessorParser; const Active: Boolean;      const DirectiveName, DirectiveParam: tbtstring; var Continue: Boolean);  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.PSScript1ProcessDirective(Sender: TPSPreProcessor;  Parser: TPSPascalPreProcessorParser; const Active: Boolean;  const DirectiveName, DirectiveParam: tbtstring; var Continue: Boolean);begin  beep;end;end.   This looks more like a compiler issue but I can't tell. it will work in console mode because the forms is not there. ---------------------------------------------------------------------- Soner · 2021-09-06 05:22 Change the Parameter Active to AActive. Don't forget it to change in your event-function too. Please write in your bug report hat they should change in lazarus\components\PascalScript\Source\uPSComponent.pas the Event TPSOnProcessDirective to: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TPSOnProcessDirective = procedure (                            Sender: TPSPreProcessor;                            Parser: TPSPascalPreProcessorParser;                            const AActive: Boolean;             // <----  CHANGE THIS                            const DirectiveName, DirectiveParam: tbtstring;                          Var Continue: Boolean) of Object;  // jgv   I could not make patch, because I am not familiar wit git. I don't know, how to create a diff file with git. ---------------------------------------------------------------------- PascalDragon · 2021-09-06 07:20 Quote from: jamie on September 06, 2021, 03:04:33 am I really don't understand this because this Active parameter should not be causing hardship with the compiler due to where it is located. Mode ObjFPC does not allow you to use the same name for a parameter of a method as for a field or property of the class it belongs to. Quote from: Soner on September 06, 2021, 07:22:04 amI could not make patch, because I am not familiar wit git. I don't know, how to create a diff file with git. Most simple case: do your changes and do Code: [Select]git diff > my-patch.diff To be sure that nothing unrelated is contained in there you can do a Code: [Select]git add path/to/file for each relevant file and then do a Code: [Select]git diff --staged > my-patch.diff Once you're satisfied you do a Code: [Select]git reset To discard the staged changes and for each modified file you no longer need you do a Code: [Select]git checkout -- path/to/file If you want to discard everything you do a Code: [Select]git reset --hard ---------------------------------------------------------------------- jamie · 2021-09-06 19:51 If i could remove my message totally from here I would but it seems I can't.. Although the TPSScript component gets  installed by default when installing Laz for the first time it has been deemed that it's not part of the lazarus distribution and gets pointed to a Github site and thus gets closed. End of discussion.  Excuse me for trying to help..  have a good day.. ---------------------------------------------------------------------- Bart · 2021-09-06 20:16 In the README.lazarus.txt: QuoteIn case of any issues you are advised to check the original distribution at https://github.com/remobjects/pascalscript/ Bart