Solved

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

Posted on 2004-08-16
2
1,505 Views
Last Modified: 2008-01-09
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
Comment
Question by:DeonCrause
2 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 500 total points
ID: 11818074
check clRTTI: http://chris.lichti.org/Lab/RTTI_Lib/RTTI_Lib.shtml
GetMethodList .. works nicely :-)
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 11818202
Alternatively http://jcl.sf.net to get the Jedi Code Library.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now