You can use the arguments class to get some of this info.

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html#propertySummary

<http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html#propertySummary>for
example

arguments.callee returns a reference to the current function and
arguments.length the number of args. You can access them like as an array
arguments[0] ect.

Hope that helps


On Mon, Apr 5, 2010 at 11:10 AM, tntomek <tnto...@yahoo.com> wrote:

>
>
> I'm trying to get 2 things:
> 1) Name of current function
> 2) Get list of arguments for some arbitrary function
>
> Is this possible?
>
> Here is an example:
>
> someMethod("jack", someCallback);
>
> -------------------------------------
>
> function someMethod(name:String, callback:Function)
> {
> // from here I'd like to do something like
> // this.getFunctionName()
>
> // and also get arguments for my callback function
> // so I can inspect them and do something about them
> // I'd like to see that someCallback has 2 parameters
> // called age and person and get their type
> }
>
> function someCallback(age:int, person:Person) {}
>
>  
>

Reply via email to