On Sat, 30 May 2009, Robert wrote:

Michael Van Canneyt wrote:


On Sat, 30 May 2009, Robert wrote:

I tried to use current http://code.google.com/p/python4delphi with
Lazarus. Did somebody use P4D successfully with recent Lazarus?
Patches? I face a few problems.


What about this problem, and what could be a workaround?
http://code.google.com/p/python4delphi/source/browse/trunk/PythonForDelphi/Components/Sources/Core/VarPyth.pas

### from variants.pp #########
procedure TCustomVariantType.VarDataClear(var Dest: TVarData);

begin
   NotSupported('TCustomVariantType.VarDataClear');
end;
...
#########################

I implemented some methods in TCustomVariantType (subversion of today), but there are still quite some missing. Please test to see if it gets you any further.


thanks, I took&compiled only the new variants.pp into the RTL

Then VarPyth.Import worked and walking/calling the Python object tree works now.
But any assignments to or from Python and argument passing fail.

pp := Import('pp');
pp.x.y();     // works!
i := pp.f();  // EVariantTypeCastError (i:Integer or LongInt)

This needs investigation.

pp.a := 99;   // TCustomVariantType.RaiseDispError not supported
pp.f(6);      // TCustomVariantType.RaiseDispError not supported

These are caused by what is still missing in custom variants :-)

Does it help to take more of current SVN ? or a principal problem with Typecasts?

I'll need to check what is still missing. The variants unit could use some
cleaning up.

Michael.

_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to