Delphi REST.client E2003 Undeclared identifier: 'rmPost' - delphi

I do
RESTRequest1.Method := rmPost;
I get
E2003 Undeclared identifier: 'rmPost'
REST.Client is in the use clause.

Add REST.Types to the uses clause.

Related

E2003 Undeclared identifier: 'IntToStr'

Try to print index in popup of showmessage gives an compile time error.
[dcc32 Error] Unit.pas(57): E2003 Undeclared identifier: 'IntToStr'
In my code I am using ShowMessage(IntToStr(J)); J is an integer.
You have to add the SysUtils unit to your calling unit's uses clause.

FMXTee.Import.pas(894): E2003 Undeclared identifier: 'Grid'

I tried to compile file FMXTee.Import.pas from TeeChart 9 for XE10 Seattle using XE10.1 Berlin and get error : [dcc32 Error] FMXTee.Import.pas(894): E2003 Undeclared identifier: 'Grid' at the following syntax (in file FMXTee.Import.pas) :
result := .....
{$IFDEF FMX}
(AComponent is TImageControl) or
((AComponent is TColumn) and (TColumnAccess(AComponent).Grid<>nil) and (TColumnAccess(AComponent).Grid is TStringGrid)) or
(AComponent is TTextControl)
{$ELSE}
(AComponent is TControl)
{$ENDIF};
I think because file FMX.Grid.pas from XE10 Seattle packages totally different to FMX.Grid.pas from X10.1 Berlin packages that I don't found Grid property of TColumnAccess class.
Now, how to fix this error ?
Please help me. Thanks a lot.

Where is defined the TgtOutFormat type in PDFtoolkit VCL library?

I have a problem to set watermark image format in the TgtImageWatermarkTemplate component (which is part of the Gnostice PDFtoolkit VCL library). I have the following code:
var
Watermark: TgtImageWatermarkTemplate;
begin
...
// create and set watermark properties
Watermark := TgtImageWatermarkTemplate.Create;
Watermark.ImageFormat := ofJPEG; // <- this line fails the compilation
...
end;
But it fails to compile with the following error:
[DCC Error] Unit1.pas(186): E2003 Undeclared identifier: 'ofJPEG'
[DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas'
Failed Elapsed time: 00:00:01.5
In which unit is the ofJPEG identifier declared (I think it's member of the TgtOutFormat enumeration)? Which unit should I add to my uses clause?
Please include gtCstPDFDoc unit in your PAS file. The enumeration TgtImageFormat is from that.
UPDATE: The enumeration values start with if and so it is ifJPEG.

"Undeclared identifier" in Delphi 7 - what must I do?

procedure TForm1.Button2Click(Sender: TObject);
begin
showmassage('Create by rihsano');
end;
Delphi reports the following error:
[Error] Unit1.pas(38): Undeclared identifier: 'showmassage'
One more question: what is "undeclared identifier"?
Replace showmassage with ShowMessage (case isn't important, but spelling is!).
"Undeclared identifier" means that Delphi cannot find the declaration that tells it what showmassage is, so it highlights it as an item that hasn't been declared.

DCC Error : E2003 Undeclared identifier: 'Result'

I was screwing around with debug setting on my compiler and now I am getting these errors that I can't seem to get rid of.
[DCC Error] HASPCODE.PAS(223): E2003 Undeclared identifier: 'Result'
It didn't complain before, but now no matter what I said the debugging settings to it keeps raising the above error just for the HASPCODE.PAS file only.
For instance, Here is one of the functions where the error is raised.
function THasp.IsHasp:Boolean;
begin
Result := fIsHasp; <<=======
end;
The implicit function Result variable is only available when the extended syntax compiler option is enabled.
The Result variable. In the {$X+} mode, the predefined
variable Result can be used within a function body to hold
the function's return value.

Resources