• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Single-click words in NSTableView / NSTextFieldCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Single-click words in NSTableView / NSTextFieldCell
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Delayed Autorelease
  • Next by Date: Re: Delayed Autorelease
  • Previous by thread: Re: What is the best approach for custom tab bar interface?
  • Next by thread: Re: Single-click words in NSTableView / NSTextFieldCell
  • Index(es):
    • Date
    • Thread