[Lazarus] Changing propertie's getter procedure by code

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Apr 20 20:22:03 CEST 2010


On Tue, 20 Apr 2010 15:10:20 -0300
Guionardo Furlan <guionardo at gmail.com> wrote:

> Hello "Lazarentos"
> 
> I created a base class that uses RTTI to link the properties of child
> classes to fields of a TDataset.
> I need to modify the base class getter method for each property.
> Checking the sources of methods RTTI, the point is PPropInfo.GetProc.
> So how to assign the address of a method to override the PPropInfo.GetProc
> each property?
> 
> Sorry, google translate this.
 
That's ok. 
But that's not excuse to send the mail to multiple lists at once. I
don't know if I should answer this at all ... Ok. I will give some
hints:

See lazarus unit ideiintf/propeedits.pp procedure
WritePublishedProperties on how to iterate all properties and see the
unit typinfo function GetOrdProp how the methods must look like. You
need one for each kind.

This is dirty hacking.

Mattias




More information about the Lazarus mailing list