docs: function(newDelegate){
        newDelegate = resolveObject(this, this.setDelegate, newDelegate, 'delegateRA_');
  
        // check is newDelegate can be linked to this object as delegate
        if (newDelegate && newDelegate instanceof DataObject)
        {
          // check for connected prevents from linking to objects
          // that has this object in delegate chains
          if (newDelegate.delegate && isConnected(this, newDelegate))
          {
            // show warning in dev mode about new delegate ignore because it is already connected with object
            /** @cut */ basis.dev.warn('New delegate has already connected to object. Delegate assignment has been ignored.', this, newDelegate);
  
            // newDelegate can't be assigned
            return false;
          }
        }
        else
        {
          // can't assign delegate if newDelegate isn't instance of DataObject
          newDelegate = null;
        }
  
        // only if newDelegate differ with current value
        if (!isEqual(this.delegate, newDelegate))
        {
          var oldState = this.state;
          var oldData = this.data;
          var oldDelegate = this.delegate;
          var oldTarget = this.target;
          var oldRoot = this.root;
          var delegateListenHandler = this.listen.delegate;
          var dataChanged = false;
          var delta;
  
          if (oldDelegate)
          {
            if (delegateListenHandler)
              oldDelegate.removeHandler(delegateListenHandler, this);
  
            // remove this from oldDelegate delegates list
            var cursor = oldDelegate.delegates_;
            var prev = oldDelegate;
            while (cursor)
            {
              if (isEqual(cursor.delegate, this))
              {
                cursor.delegate = null;
                if (isEqual(prev, oldDelegate))
                  oldDelegate.delegates_ = cursor.next;
                else
                  prev.next = cursor.next;
  
                break;
              }
              prev = cursor;
              cursor = cursor.next;
            }
          }
  
          if (newDelegate)
          {
            // assign new delegate
            this.delegate = newDelegate;
  
            // add delegate listener
            if (delegateListenHandler)
              newDelegate.addHandler(delegateListenHandler, this);
  
            // add object to delegate's list of delegates
            newDelegate.delegates_ = {
              delegate: this,
              next: newDelegate.delegates_
            };
  
            // possible only when set delegate on init
            if (this.data !== INIT_DATA)
            {
              // calculate delta as difference between current data and delegate info
              delta = {};
  
              for (var key in newDelegate.data)
                if (key in oldData === false)
                {
                  dataChanged = true;
                  delta[key] = undefined;
                }
  
              for (var key in oldData)
                if (oldData[key] !== newDelegate.data[key])
                {
                  dataChanged = true;
                  delta[key] = oldData[key];
                }
            }
          }
          else
          {
            // reset delegate and info
            this.delegate = null;
            this.target = null;
            this.root = this;
            this.data = {};
  
            // copy data, no update, no delta
            for (var key in oldData)
              this.data[key] = oldData[key];
          }
  
          applyDelegateChanges(this, oldRoot, oldTarget);
  
          // emit event if data changed
          if (dataChanged)
            this.emit_update(delta);
  
          // emit event state changed
          if (delta && oldState !== this.state && (String(oldState) != this.state || oldState.data !== this.state.data))
            this.emit_stateChanged(oldState);
  
          // fire event if delegate changed
          this.emit_delegateChanged(oldDelegate);
  
          // delegate was changed
          return true;
        }
  
        return false; // delegate doesn't changed
      }