Solved

Get methodname at runtime

Posted on 2002-06-01
3
289 Views
Last Modified: 2010-04-04
Hi Guys,

Does anyone know how to retrieve the name of a calling method? For example:

A -> Z
B -> Z
C -> Z

Different methods can call method Z, and Z likes to know the methodnames of the caller.

This is for a logging component i'm creating.
0
Comment
Question by:bassch
3 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
ID: 7048627
Without extra information it should only possible for published elements of a class. published means that the name is added to the RTTI.
Have a look at the Jedi Code Library http://delphi-jedi.org/CODELIBJCL it contains a nice debuugging extension which adds the MAP file to the exe which then allows to unwind the stack with names.
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010407
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from robert_marquardt

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 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