Hey !
Based on your little code I've created a (realy simple) class which act like the old "arguments supported delegate"..without changing the scope
Use :Code:package { import flash.events.Event; public class CallArg{ public function CallArg(){ } public static function create(method:Function, ... args):Function { return function(event:Event):void{ method.apply(null, [event].concat(args)); } } } }
and the listening handler should have his first arguments as an EventCode:someObj.addEventListener(SOME_EVENT, CallArg.create(SOME_FUNC, ARG1, ARG2, ARG3 ) )
Code:SOME_FUNC(_event:Event, ARG1, ARG2, ARG3) { }




Reply With Quote