freelanceprogrammers.org Forum Index » Delphi

Re: Update


View user's profile Post To page top
blanquet123 Posted: Fri Apr 07, 2006 6:48 pm


Joined: 07 Apr 2006

Posts: 1
Re: Update
Hello Morgan,
 
I`m using the last release of your P4D library.
In order to be able to obtain an iterable delphi wrapped object, I`ve made the following modifications to the file "WrapDelphi.pas":
 
1 - Declaration in "interface" section instead of "implementation" section :
 
  TRegisteredClass = class    DelphiClass : TClass;    PythonType : TPythonType;  end;
2 - Modification of  class TPyDelphiWrapper:
 
declaration of :
 
   function  RegisterDelphiWrapper(AWrapperClass : TPyDelphiObjectClass):TRegisteredClass;
 
instead of procedure with the same name.
 
 
With these modifications I`m able to specify at runtime :
 
Var WClass:TRegisteredClass
 
   WCLass:=PyDelphiWrapper.RegisterDelphiWrapper(TpyMyDelphiObject);   WClass.PythonType.Services.Basic:=WClass.PythonType.Services.Basic+[bsRepr,bsStr,bsIter,bsGetAttr,bsSetAttr];   PyDelphiWrapper.Initialize;
 
and the wrapped TpyMyDelphiObject becomes thus iterable.
 
I don`t know if it`s the optimal way to proceed, anyway it works.
 
Could you please give me further information about the possibility to do the same, without modifying the library, and if it is not possible,
take my remark into account in the incoming versions of P4D.
 
Best regards, and many thanks for your great work.
 
Laurent.

----- Original Message -----
From: Morgan Martinet
To: pythonfordelphi@yahoogroups.com
Sent: Thursday, December 22, 2005 7:36 AM
Subject: [pythonfordelphi] Update

Hi everybody,
I`m happy to announce a new release of both P4D and PyScripter.
You can download them at http://mmm-experts.com/
Read the version history of :P4D at http://mmm-experts.com/VersionHistory.aspx?ProductId=3PyScripter at http://mmm-experts.com/VersionHistory.aspx?ProductId=4
I`ll use the opportunity to wish you all a meery Christmas and happy new year 2006!!!
Bye,
Morgan
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help