Delphi Error or Bug in Procedure Creation

Asked

Viewed 396 times

7

In the creation of Procedure automatics, double click on the component, Delphi XE8 and Delphi-10 is having a strange reaction he mixes the new Procedure with one of the existing Procedure, making their names wrong and I have to correct all of them. The new Procedure starts with two "P" ex:

pprocedure and the existing database adds a "P" ex: rocedure

As an example of code below:

pprocedure TfrmCliente.cdsMasterBeforeCancel(DataSet: TDataSet);
begin
  inherited;

end;

rocedure TfrmCliente.cdsMasterBeforePost(DataSet: TDataSet);
begin
  inherited;
  if (cdsMaster.State = dsInsert)  then
     cdsMaster.FieldByName('CODIGO').AsString := '000000';

end;
  • this occurs even in the version xe7 I am using, usually it is some error that we did not notice and ended up confusing the IDE, give a look at the INSERT key if it was not triggered accidentally, here just open and close "the project" that everything goes back to normal!

  • 1

    This is a Delphi bug anyway. I work with XE7 and have this kind of problem almost every day.

  • 1

    Just like @Júniormoreira said. This usually happens when you haven’t finished the "Uses" clause with ";" or when you haven’t finished with "end" a class statement, and so on. Checks if your code compiles without declaring "Automatic methods"

1 answer

2

Good morning Ailton, this problem usually occurs when we ask the IDE to create the Procedure automatically and there is some code error, for example a missing period and comma.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.