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

x
?
Solved

Get methodname at runtime

Posted on 2002-06-01
3
Medium Priority
?
296 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 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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 quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview

926 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