Sign in Join

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

Mailing lists / fpc-pascal / 2011-05

Examine methods with TypeInfo

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Fuchs

Hello,

I know how to find published properties with TypeInfo, but how can I find methods?

type
   MyClass = class(TObject)
     published
       function Function1(APara: String): LongInt;
       function Function2(APara: String): Boolean;
       function Function2(APara: Integer): LongInt;
   end;

I need the method names, the parameter types and the return type.

Thx
Michael

Michael Fuchs
to Jonas Maebe
Jonas Maebe wrote 5 lines
> I know how to find published properties with TypeInfo, but how can I > find methods? This test checks that functionality: http://svn.freepascal.org/svn/fpc/trunk/tests/webtbs/tw12038.pp

Sorry, maybe I am to stupid, but if I understand this test it only finds method properties.

So, in my example I have to add three properties which points to the methods. But I want to direct find the published methods.

Or do I need the trunk version of FPC? I use 2.4.2 on my machine.

thx
Michael