Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1567
  • Last Modified:

Delphi RTTI : Retrieve method names (not only those marked with property)

I've written a few classes making use of pulished properties to allow a grid to be used to edit the properties using RTTI. Now I want to read the published methods and add them to a generic popup-menu. The problem : Using TypInfo GetPropList, I only get the methods (events) marked with "property", and not any other methods, even though I use tkMethods. My question : How do I get a list of published method names if possible? e.g :

...
published  
  property OnEvent : TOwnEvent read FOnEvent write FOnEvent default nil; << This is returned by GetPropList
  procedure DoSomething; <<This is not returned by GetPropList.
end;
...

Any help will be greatly appreciated!
Thanks.
0
DeonCrause
Asked:
DeonCrause
1 Solution
 
Lee_NoverCommented:
check clRTTI: http://chris.lichti.org/Lab/RTTI_Lib/RTTI_Lib.shtml
GetMethodList .. works nicely :-)
0
 
robert_marquardtCommented:
Alternatively http://jcl.sf.net to get the Jedi Code Library.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now