home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / Delegate.as < prev    next >
Encoding:
Text File  |  2013-04-24  |  696 b   |  32 lines

  1. class Delegate extends Object
  2. {
  3.    var func;
  4.    function Delegate()
  5.    {
  6.       super();
  7.    }
  8.    function DelegateArgs(f)
  9.    {
  10.       this.func = f;
  11.    }
  12.    static function create(obj, func)
  13.    {
  14.       var _loc3_ = function()
  15.       {
  16.          var _loc2_ = arguments.callee.target;
  17.          func = arguments.callee.func;
  18.          var _loc3_ = arguments.callee.arg;
  19.          _loc3_ = _loc3_.concat(arguments);
  20.          return func.apply(_loc2_,_loc3_);
  21.       };
  22.       _loc3_.target = obj;
  23.       _loc3_.func = func;
  24.       _loc3_.arg = arguments.slice(2);
  25.       return _loc3_;
  26.    }
  27.    function createDelegate(obj)
  28.    {
  29.       return Delegate.create(obj,this.func);
  30.    }
  31. }
  32.