Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-04

Changing propertie's getter procedure by code

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Guionardo Furlan

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.

Timeo hominem unius libri Cogito ergo sum - Carpe diem []s Guionardo Furlan http://guionardo.blogspot.com http://www.guionardofurlan.com.br -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100420/899c1cd9/attachment-0001.html>

Reply by email

Mattias Gaertner
to Guionardo Furlan
Show quoted text 10 lines
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 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

Reply by email

Guionardo Furlan
to Mattias Gaertner

Thanks for answer.
I thought that were different lists. Sorry.
Will use only this from now.

Thanks for the help, Mattias

2010/4/20 Mattias Gaertner

Show quoted text 34 lines
On Tue, 20 Apr 2010 15:10:20 -0300 Guionardo Furlan 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 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 -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Timeo hominem unius libri Cogito ergo sum - Carpe diem []s Guionardo Furlan http://guionardo.blogspot.com http://www.guionardofurlan.com.br

Reply by email