Issue 74 in extpascal: ExtJSWrapper can't compile application on Lazarus?

223 views
Skip to first unread message

extp...@googlecode.com

unread,
Jun 13, 2013, 12:22:09 PM6/13/13
to extp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium OpSys-All

New issue 74 by pavelar...@gmail.com: ExtJSWrapper can't compile
application on Lazarus?
http://code.google.com/p/extpascal/issues/detail?id=74

Lazarus 1.0.8 r40573 FPC 2.6.2 x86_64-win64-win32/win64
extpascal r819

..\ExtJSWrapper\Ext.pas(19878,43) Error: Wrong type "TArrayOfString" in
array constructor

in

function TExtAbstractComponent.AddCls(Cls : TArrayOfString) : TExtFunction;
begin
JSCode(JSName + '.AddCls(' + VarToJSON([Cls])
+ ');', 'TExtAbstractComponent');
Result := Self;
end;
....

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

extp...@googlecode.com

unread,
Feb 24, 2014, 5:05:53 PM2/24/14
to extp...@googlegroups.com

Comment #1 on issue 74 by jean.suz...@gmail.com: ExtJSWrapper can't compile
I tried to compile ExtPascalSamples from r819 on Delphi 7 (under wine) and
Lazarus 1.0.14 with FPC 2.6.2 on Ubuntu 13.10 (AMD 64 bits).

You can't put a dynamic array like TArrayOfString as an element of an array
of const on delphi 7 and FPC 2.6.2. But you can put an array of variants.

As a workaround, I tried to convert instances of TArrayOfString and
TArrayOfInteger in arrays of variants, using VarArrayCreate.

I added two function in Ext.pas :
function VarArray_from_TArrayOfString( _a: TArrayOfString): Variant;
function VarArray_from_TArrayOfInteger( _a: TArrayOfInteger): Variant;

and modified all the references to instance of TArrayOfString and
TArrayOfInteger in array constructors.

I imagine the best would be to modify the source generator ExtToPascal,
replacing in array constructors references to the arrays by something like:
{$IFDEF FPC}
' VarArray_from_'+ArrayType+'('+ArrayName+')'
{$ELSE}
ArrayName
{$ENDIF}
where ArrayName is the variable with the name of the array like 'Cls'
and ArrayType is the variable with the name of type of the array
like 'TArrayOfString'.

Then I could compile Ext.pas.
I got some errors in code specific to ExtPascalSamples. It seems a unit
ExtForm is missing. I commented out lines referencing properties that do
not exist.
The project compiled but I got an access violation in ExtPAscal.pas in
TExtThread.GetSequence, it seems this code is called before the creation of
a TExtThread on a nil reference. Maybe in the initialization clause of unit
ExtPascal, the creation of ExtUtilTextMetrics induces a call to
CreateJSName before the thread is created in the dpr file.
I didn't go further for now.


I join a diff file for Ext.pas and my modified Ext.pas.

I hope this helps.
Yours sincerely,
Jean SUZINEAU

Attachments:
Ext.pas.diff 139 KB
Ext.pas 2.6 MB

Walter Sparding

unread,
Mar 3, 2014, 1:57:21 PM3/3/14
to extp...@googlegroups.com, codesite...@google.com, extp...@googlecode.com
Do you have a solution to the problem ?
Have the same problem.

Waldo

Павел Сериков

unread,
May 29, 2014, 11:01:58 AM5/29/14
to extp...@googlegroups.com, codesite...@google.com, extp...@googlecode.com
Thanks for the help, but I have the same problem with " I got an access violation in ExtPAscal.pas in TExtThread.GetSequence", I do not know how to resolve it ...

четверг, 13 июня 2013 г., 19:22:09 UTC+3 пользователь extp...@googlecode.com написал:
Reply all
Reply to author
Forward
0 new messages