Solved

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

Posted on 2004-08-16
2
1,500 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 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

18 Experts available now in Live!

Get 1:1 Help Now