The only solution I can think of is to manually test and track the mouse in your NSCell. The hardest part (to which I have no answer) is how to determine the direct text of the link ... I hope someone can answer this?
After you learn about the direct text of the URL, you can implement the click by executing hitTestForEvent. I think you will do it something like this:
// If the event is a mouse down event and the point is inside the rect trigger the url - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)frame ofView:(NSView *)controlView { NSPoint point = [controlView convertPoint:[event locationInWindow] fromView:nil]; // Check that the point is over the url region if (NSPointInRect(point, urlFrame)) { // If event is mousedown activate url // Insert code here to activate url return NSCellHitTrackableArea; } else { return [super hitTestForEvent:event inRect:frame ofView:controlView]; } }
source share