home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / breakawish.swf / scripts / __Packages / Library / Utils / Delegate.as < prev    next >
Encoding:
Text File  |  2007-09-28  |  724 b   |  32 lines

  1. class Library.Utils.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 _loc2_ = function()
  15.       {
  16.          var _loc3_ = arguments.callee.target;
  17.          func = arguments.callee.func;
  18.          var _loc2_ = arguments.callee.arg;
  19.          _loc2_ = _loc2_.concat(arguments);
  20.          return func.apply(_loc3_,_loc2_);
  21.       };
  22.       _loc2_.target = obj;
  23.       _loc2_.func = func;
  24.       _loc2_.arg = arguments.slice(2);
  25.       return _loc2_;
  26.    }
  27.    function createDelegate(obj)
  28.    {
  29.       return Library.Utils.Delegate.create(obj,this.func);
  30.    }
  31. }
  32.