Hi,

I am not sure how you are going to use this functionality with AS3.0.
Firstly AS3 does not support method overloading... so the case of having two
or more methods with same name and different number of parameters is out of
question. And if you are going to make a function call, and there is an
argument count mismatch, you will get a compile-time error. The only
possible way I see to solution to this problem (may not be applicable in
your case), is to have f2 that take any number of parameters using "...args"
and then from f1() pass any number of parameters.

If this does not apply in your case, can you explain us where you are going
to use this functionality. There has to be some workaround to this issue.

Regards,
Venkat
www.venkatv.com


On Sat, Jan 31, 2009 at 12:01 PM, ganesh <ganeshnay...@gmail.com> wrote:

>
> Thanks a lot for the quick reply. I expected this reply!!
> This works fine if you are inside the function. But if you want to
> call another function say we are trying to call function f2 in
> function f1. I don't know how many parameters f2 takes, it varies.
> then how to introspect the function f2 to call it with proper number
> of parameters?
>
> On Jan 30, 6:05 pm, "v...@t" <vira...@gmail.com> wrote:
> > hello,
> >
> > Try to use arguments.length.
> >
> > like .....
> >
> >            privatefunctiontest(str:String,count:int):void
> >            {
> >                    trace ( arguments.length );  // return number of
> parameter
> > thisfunctiontake = 2
> >            }
> >
> > may help.
> >
> > Thanks
> > VIrat Patel
> >
> > On Jan 30, 5:30 pm, ganesh <ganeshnay...@gmail.com> wrote:
> >
> >
> >
> > > Hello All,
> > >           I want to call afunction. I just want to know how many
> > >parametersthatfunctiontakes? Is there any API available to get a
> > > count of number of arguments afunctiontakes?
> > > Thanks.- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to