If a `NSTextView` contains the following:

```
SELECT someTable.someColumn FROM someTable

```

And a user double-clicks `someTable.someColumn`, 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 `someTable` or the `someColumn` to be selected.

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.

At the moment what I'm thinking of doing is subclassing `NSTextView` and doing something such as:

```
- (void)mouseDown:(NSEvent *)theEvent
{
  if(theEvent.clickCount == 2)
  {
    // TODO: Handle double click selection.
  }
  else
  {
    [super mouseDown:theEvent];
  }
}

```

Does anyone have any thoughts or alternatives to this? (Is there another method I am missing that may be better for overriding)?