To clarify, I meant arguments of a function given nothing more then a reference 
to that function
i.e. var myFunction:Function

The 'arguments' object is only valid withing the scope of a running function is 
it not?


--- In flexcoders@yahoogroups.com, Robert VanCuren Jr <robert.vancuren...@...> 
wrote:
>
> 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...@...> 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