Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delphi 2009 Compatibility #4

Closed
GoogleCodeExporter opened this issue Aug 24, 2015 · 11 comments
Closed

Delphi 2009 Compatibility #4

GoogleCodeExporter opened this issue Aug 24, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

Need Delphi 2009 Compatibility

Original issue reported on code.google.com by halukcet...@gmail.com on 21 May 2009 at 7:28

@GoogleCodeExporter
Copy link
Author

Original comment by pyscripter on 6 Dec 2009 at 12:16

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Here's my patch versus 3.32 to add support for Python 2.6, Delphi 2009/2010. 
Only 
VarPyth, the core and the likes have been ported, I haven't looked at the atom 
stuff.
A full archive with the patch and the patched files can be found attached as 
well, 
might be easier to use.

Original comment by koenvand...@gmail.com on 7 Jan 2010 at 2:58

Attachments:

@GoogleCodeExporter
Copy link
Author

KOen, thank you for doing the D2009/2010 port.

I have also fixed (hopefully) all the issues with the pydb.pas module so that it
compiles and works correctly in D2010.

Richard

Original comment by rjkin...@gmail.com on 25 Mar 2010 at 11:14

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

rjking - should not there be changes to pyDBTables.pas too?  to change from 
PChar to 
PAnsiChar in getAttr and setAttr?
I am using Python 2.6 and Delphi 2010

Original comment by mmhamz...@gmail.com on 6 Jun 2010 at 12:47

@GoogleCodeExporter
Copy link
Author

Another thing in PythonEngine.pas
If DELPHI2010:  TheType is avoided entirely thus 'killing' demos 6 and 7 that 
use 
TheType structure.
The thing is that with Delphi 2010 WITH can not be used with a property name 
anymore.  The with keyword can no longer be used to provide write-access to 
record fields, through the read-only property name. use the field name 
instead to provide writeable record properties.
So with Delphi 2010, we can use the provided field name FType instead of 
TheType.
I attached PythonEngine.pas with the changes.  Search file for mmh.
Removed DEF from TheType property declaration.
Then later if DELPHI2010 use: with FType do
ELSE use: with TheType do

In demos 6 and 7 use the with keyword appropriately.  With Delphi 2010 use:
var FType : PyTypeobject
then use:
with FType do

where with TheType appears.

In demos 6 and 7 - they run partially now then I get an exception that I need 
to 
look at.

Original comment by mmhamz...@gmail.com on 6 Jun 2010 at 10:55

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Furthermore (not included in PythonEngine.pas I attached before).
In PythonEngine,pas I moved:
FType : PyTypeObject;
from the Protected section of TPythonType = class(TGetSetContainer)
to the Public section.
This allows TheType to be accessed via FType in Demos 6 and 7.  These work now 
with no exceptions.  Of course declaring FType in demos 6 and 7 is not 
necessary and WRONG!
Anyone reads thiese comments anyway?  Anyone working on this project?

Original comment by mmhamz...@gmail.com on 12 Jun 2010 at 4:56

@GoogleCodeExporter
Copy link
Author

Fixed in version control.
Updated and tested everything (including demos) except from stuff in 
C:\Delphi\progs32PythonForDelphi\Components\Sources\VCL (database stuff) which 
I do not use.
Included package for Delphi 2010.


If someone comes along with an update for these 4 units I will update the SVN.

Original comment by pyscripter on 25 Aug 2010 at 10:32

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I have updated the database stuff for Unicode as well.  However there are 
various issues when running the related demos.  I checked with Delphi 2006 and 
the issues existed there as well.  If someone is interested in maintaining the 
database units in PythonForDelphi\Components\Sources\VCL then I would be happy 
to update them.  Otherwise you should consider them as deprecated and possibly 
unstable.  I am not planning to do any work on them.

In any case a better way to wrap the database stuff would be to use the 
WrapDelphi appproach.

Original comment by pyscripter on 26 Aug 2010 at 1:01

@GoogleCodeExporter
Copy link
Author

I have applied a fix by Lee Shaver to the database components and they now seem 
to work well with Delphi 2010 and 2006.

Original comment by pyscripter on 1 Sep 2010 at 6:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant