Recent

Author Topic: Changing propertie's getter procedure by code  (Read 3645 times)

Guionardo Furlan

  • New Member
  • *
  • Posts: 18
    • Guionardo Furlan
Changing propertie's getter procedure by code
« on: April 20, 2010, 05:25:11 pm »
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 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.

Guionardo Furlan

  • New Member
  • *
  • Posts: 18
    • Guionardo Furlan
Re: Changing propertie's getter procedure by code
« Reply #1 on: April 20, 2010, 07:19:04 pm »
I've writed this question to some email lists and have been told off by Mattias  :-[
But he gave me the direction:

Quote
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

Thanks again Mattias 8-)

 

TinyPortal © 2005-2018