title: NSTextView customizing double click selection
body: <p>If a <code>NSTextView</code> contains the following:</p>
  
  <pre><code>SELECT someTable.someColumn FROM someTable
  </code></pre>
  
  <p>And a user double-clicks <code>someTable.someColumn</code>, the entire thing gets selected (both sides of the period). In this specific case (a query editor), it would make more sense for either the <code>someTable</code> or the <code>someColumn</code> to be selected.</p>
  
  <p>I've tried looking around to see if I can figure out a way to customize the selection, but I have been unable to so far.</p>
  
  <p>At the moment what I'm thinking of doing is subclassing <code>NSTextView</code> and doing something such as:</p>
  
  <pre><code>- (void)mouseDown:(NSEvent *)theEvent
  {
    if(theEvent.clickCount == 2)
    {
      // TODO: Handle double click selection.
    }
    else
    {
      [super mouseDown:theEvent];
    }
  }
  </code></pre>
  
  <p>Does anyone have any thoughts or alternatives to this? (Is there another method I am missing that may be better for overriding)?</p>