|
-
 Originally Posted by senocular
You could also make your own delegate-esque wrapper for adding arguments
Code:
function addArguments(method:Function, additionalArguments:Array):Function {
return function(event:Event):void {
method.apply(null, [event].concat(additionalArguments));
}
}
stage.addEventListener("click", addArguments(handleClick, [1,2,3]));
function handleClick(event:Event, a:int, b:int, c:int):void {
trace(arguments); // [MouseEvent ...], 1, 2, 3
}
...that ...is nice 
I'll try each solution and see which one suit the best for our team (...about 20 coder :S)
OULALALALLALAOUAOUALALLALL...
I hate signature
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|