views:

22

answers:

2

Hi,

Is there a way to know from which object a method (a Function object) came from? tx

+1  A: 

The keyword "this" will give you the object the method ("function") is located (unless you are using delegates.)

You can use arguments.callee to get a reference to the current function, but there's no arguments.caller to get the object calling your function. You'll have to pass that object as an argument.

http://livedocs.adobe.com/flex/2/langref/arguments.html#callee

Andir
A: 

Not altogether orthodox, nor efficient, but you could play around with this overflow user's original post:

http://stackoverflow.com/questions/149073/stacktrace-in-flash-actionscript-3-0

Ben