Single-click words in NSTableView / NSTextFieldCell
Single-click words in NSTableView / NSTextFieldCell
- Subject: Single-click words in NSTableView / NSTextFieldCell
- From: Tony P <email@hidden>
- Date: Thu, 8 Apr 2010 16:17:47 +0100
Hi Folks,
I'm trying to implement single-clicking for multiple words/phrases
within an NSTableView / NSTextFieldCell, which seems surprisingly
tricky. I've tried using NSAttributedString (in the hope I can use a
special NSURLProtocol to intercept the hyperlink), but it takes four
clicks to get there (row select, cell select, edit, and link-click).
I've tried numerous tricks but to no avail.
I can over-ride hitTestForEvent (see the "Hyperlinks in Table Views"
thread) so the other alternative would be some way of getting
characterIndexForPoint for the NSTextFieldCell, but that doesn't seem
to exist. I'm hoping I don't need to do something wacky with an off-
screen view.
How can I get the NSTextFieldCell to react with just one click? Or is
there a way to get characterIndexForPoint for the NSTextFieldCell?
Tony Pollard
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden