title: Creating an in-app link in NSTextView
body: <p>I found this little snippet which allows one to create links from text in an NSTextView:</p>
  
  <pre><code>-(void)setHyperlinkWithTextView:(NSTextView*)inTextView
  {
      // create the attributed string
      NSMutableAttributedString *string = [[NSMutableAttributedString alloc] init];
  
      // create the url and use it for our attributed string
      NSURL* url = [NSURL URLWithString: @"http://www.apple.com"];
      [string appendAttributedString:[NSAttributedString hyperlinkFromString:@"Apple Computer" withURL:url]];
  
      // apply it to the NSTextView's text storage
      [[inTextView textStorage] setAttributedString: string];
  }
  </code></pre>
  
  <p>Would it be possible to have the link point to some resource in my application, for example to a specific handler class that is capable of interpreting the links and dispatch to a corresponding view/controller?</p>