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.
Related
When building a program that uses the Graphics32 library (the old 1.9.1 version) with Delphi XE4 (targeting Win32, if it matters), I got the following compiler error:
[dcc32 Error] GR32_LowLevel.pas(1240): E2010 Incompatible >types: 'PPointer' and 'Pointer'
Which is produced by this line:
Registry.RegisterBinding(FID_FILLLONGWORD, ##FillLongWord);
Where RegisterBinding is defined as:
procedure RegisterBinding(FunctionID: Integer; BindVariable: PPointer);
And FillLongword is defined as:
var
FillLongword: procedure(var X; Count: Cardinal; Value: Longword);
How to resolve the compiler error? To my eyes it seems that the syntax is correct, isn't ## means 'pointer of pointer', which is PPointer?
Thanks.
I tried to compile file FMXTee.Chart.Grid.pas from TeeChart 9 for XE10 that used CellControlByRow function in FMX.Grid.pas for the following code :
with TColumnAccess(Columns[Col]).CellControlByRow(Row).BoundsRect.BottomRight do begin ... end;
I get running well when using RAD XE10 Seattle, and now I tried with RAD XE10.1 Berlin but get error message : [dcc32 Error] FMXTee.Chart.Grid.pas(1507): E2003 Undeclared identifier: 'CellControlByRow'
Then I compare file FMX.Grid.pas from XE10 packages versus FMX.Grid.pas from XE10.1 packages, and there are a lot of differences especially CellControlByRow() function does not exist any more in FMX.Grid.pas from XE10.1.
Now, I want ask how to change the code that use CellControlByRow function so it will run in RAD XE10.1 Berlin ?
I would like suggest you replace the code below:
result:=TColumnAccess(Columns[Col]).CellControlByRow(Row).BoundsRect.BottomRight;
For next :
...
var tmp : TFmxObject;
begin
tmp:=TColumnAccess(Columns[Col]).CellControl;
result:=TControl(tmp).BoundsRect.BottomRight
...
The above code should fix the compilation problem you’re experiencing. Could you confirm that?
I found this macro code in Delphi/Pascal syntax but i can't use it! Does Delphi support macro codes like C/C++ or this macro is for another language such as Lazarus ???
The macro :
{$ifdef Profile}
{$define __TRACE__:= try }
{$define __END__:= finally ShowMessage('Hello !'); end;}
{$else}
{$define __TRACE__:= //}
{$define __END__:=}
{$endif}
I'm trying to use like this :
...
__TRACE__
// Somethings
__END__
...
I caught this compiler message :
[dcc32 Error] Unit1.pas(37): E2003 Undeclared identifier: '__TRACE__'
[dcc32 Error] Unit1.pas(38): E2066 Missing operator or semicolon
[dcc32 Error] Unit1.pas(39): E2003 Undeclared identifier: '__END__'
{Excuse me if my English is bad}
These are Free Pascal macros. There's nothing at all like this available for the Delphi compiler. Some options:
Use a logging framework (there are many good logging libraries available) to add trace debug facilities to the code. Frankly that would be a huge improvement on what is shown here.
Expand the code manually. That is each time you see __TRACE__ in the code, replace that with an inline $IFDEF. Not appealing at all.
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.
I need a bit of help; I'm helping a friend port a Delphi app built years back to newer versions of Windows, as it currently only runs on Windows 95.
The code utilises 3rd party libraries from Woll2Woll for DB operations.
One of these libraries generates the error E2003 Undeclared identifier: 'self'.
I've been through a number of sites via Google and with my limited knowledge of Delphi (stemming from my Pascal training about 12 years ago and extrapolating my slightly rusted PHP, BASH, ColdFusion and ASP coding skills), I've run into a brick wall - I'm strapped for time and can't make sense of the info I'm coming across on the web.
The problematic code segment is from the wwwQuery.pas file and looks like this:
{$ifdef wwDelphi3Up}
procedure TwwQuery.OpenCursor(InfoQuery: Boolean);
{$else}
procedure TwwQuery.OpenCursor;
{$endif}
begin
{$ifdef wwDelphi3Up}
inherited OpenCursor(InfoQuery);
{$else}
inherited OpenCursor;
{$endif}
//Modded by Arie
//wwSaveAnswerTable(self, Handle, FAnswerTable);
wwSaveAnswerTable(self, Handle, 'FAnswerTable');
end;
The precise error messages are:
[DCC Error] wwQuery.pas(243): E2003 Undeclared identifier: 'self'
[DCC Error] wwQuery.pas(244): E2029 '.' expected but ';' found
[DCC Fatal Error] wwcommon.pas(285): F2063 Could not compile used unit 'wwQuery.pas'
Line 243 is the 2nd last line, just above the end;
The wwSaveAnswerTable function looks like this:
Function wwSaveAnswerTable(ADataSet: TDBDataSet; AHandle: HDbiCur; tableName: string): boolean;
What must I change the Self parameter to, to stop the compile error?
Thanks a stack.
The problem is related to compiler define wwDelphi3Up or any related up in code.
As you see next error message: [DCC Error] wwQuery.pas(244): E2029 '.' expected but ';' found
Compiler expects end of program, and line wwSaveAnswerTable(self, Handle, 'FAnswerTable'); are not compiled inside OpenCursor method. That's why Self is not defined.
You don't need to change parameter, because for sure will affect functionality.
Try to compile it without defines, if you are not use an ancient version of Delphi:
procedure TwwQuery.OpenCursor(InfoQuery: Boolean);
begin
inherited OpenCursor(InfoQuery);
wwSaveAnswerTable(self, Handle, 'FAnswerTable'); // Here prob FAnswerTable without quotes
end;