title: Scrolling NSTextView to bottom
body: <p>I'm making a little server app for OS X and I'm using an NSTextView to log some info about connected clients.</p>
  
  <p>Whenever I need to log something I'm appending the new message to the text of the NSTextView this way:</p>
  
  <pre><code>- (void)logMessage:(NSString *)message
  {
      if (message) {
          self.textView.string = [self.textView.string stringByAppendingFormat:@"%@\n",message];
      }
  }
  </code></pre>
  
  <p>After this I'd like the NSTextField (or maybe I should say the NSClipView that contains it) to scroll down to show the last line of its text (obviously it should scroll only if the last line is not visible yet, in fact if then new line is the first line I log it is already on the screen so there is no need to scroll down). </p>
  
  <p>How can I do that programmatically?</p>