var Base = Class.create({},{
  
  /**
     * Arguments:
     *
     * object context 
     * function or string handler
     * array additional arguments (to be passsed to closure)
     *
     * Alternative arguments:
     *
     * function or string handler
     * array additional arguments (to be passsed to closure)
     *
     * * if string is passed as handler, using this as source object for handler
     */
  
  getHandler:function(){

    if (!arguments[0])
      throw Error("Base.getHandler: first argument should not be empty");
    
    var context,source,handler,args = Array.prototype.slice.apply(arguments);
        
    //conetxt handling
    if (typeof args[0] === "object") //context passed
      context = args.shift();
    else 
      context = this;
    
    //handler handling
    handler = args.shift();
    if (handler.constructor === String)
      handler = this[handler];
      
    return function(){
      var a = [];
      if (args[0] && args[0].constructor === Array)
        a = Array.prototype.slice.apply(args[0]);
        
      if (arguments.length > 0) {
        for (var i = 0, l = arguments.length; i<l;i++)
          Array.prototype.push.apply(a,[arguments[i]]);
      }
      Array.prototype.push.apply(a,[this]);
      
      return handler.apply(context,a);
    }
    
  } 
  
});