Quantcast
Viewing all articles
Browse latest Browse all 2935

Get the caller of a function

Hi.

 

Anyone who knows how to get the object which has called a function?

I have a function in a non visual object which is called from several windows and other function.

Now i need to find out who has made the call, and return a slightly different value if it has been called from a certain window.

I've tried parent.classname(), but the function has no parent.

Kind of like looking at the call stack in debug mode, but in code at runtime.

 

Any ideas?

 

Regards,

 

Bjarne Anker

Maritech Systems AS

Norway


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>