Hello :)
The "arguments" object is an Array... you can use the Array methods over
this object...
The functions in ECMAScript contains 2 methods (apply and call..) the apply
method can help you :
myFunction.apply( scope:Object, args:Array )
try this :
var f1 = function ( )
{
trace(arguments) ;
}
var f2 = function( )
{
f1.apply(this, arguments) ;
}
f2(1, 2, 3) ;
EKA+ :)
2007/7/18, Swapnil Dubey <[EMAIL PROTECTED]>:
Hi all,
I want to implement an function funcA that takes a variable list of
arguments, and passes on that list to another function funcB, just like
setInterval does.
funcA = function()
{
// Here I can access the arguments through the arguments
array.
// But how do I pass it on the arguments to funcB that I am
calling below.
// I mean I cannot write funcB(arguments[0], arguments[1],
arguments[n]....);
// as the last index n will be specified at runtime.
funcB();
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com