Passing ...rest arrays to another function
Quick tip on how to pass ...rest arrays to another function. I ran into this on my current project at work and wasted a good half hour or so before I figured it out. Duh!
private function myFunction1(strVar1:String, objVar2:Object, ... rest):void {
myFunction2.apply(null, [strVar1, objVar2].concat(rest));
}
Labels: ...rest arrays, actionscript 3.0, Flex

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home