Thanks venkat for your quick reply.
Example scenario is labelfunction of a datagrid takes two parameters
-  data and column. But datatipFunction takes only one parameter. If
we make the second paramter of labelFunction taking befault value null
for second parameter like -
labelfunction(data:Object, column:DataGridColumn = null) then we can
use this labelfunction for assigning to datatipFunction also along
with assigning it to labelFunction.
In an application suppose we have not used this type of labelfunction
for datatipFunction instead we have used a function with only
parameter like - mydatatipfunction(data:Object).
Suppose I override the itemToDataTip method of DataGridColumn class to
pass the column data for scenarios where labelfunction is used for
datatipFunction. How to identify a mydatatipfunction is used or
labelfunction is used? So I thought of checking for number of
parameters the function takes. Hope its clear now. Let me know if you
need any other details.

On Jan 31, 12:49 pm, Venkat Viswanathan <[email protected]> wrote:
> 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,
> Venkatwww.venkatv.com
>
>
>
> On Sat, Jan 31, 2009 at 12:01 PM, ganesh <[email protected]> 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" <[email protected]> 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 <[email protected]> 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 -- 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to