• 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
Re: Hyperlinks in Table Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hyperlinks in Table Views


  • Subject: Re: Hyperlinks in Table Views
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 27 Jan 2010 15:44:19 -0800

> I think I may have got this to work, so here goes:
>
> The data cell for the table column displaying the hyperlink is now a custom NSTextFieldCell with the following implementation over-ridden:
>
> - (NSUInteger)hitTestForEvent: (NSEvent *)event
>                                           inRect: (NSRect)cellFrame
>                                           ofView: (NSView *)controlView
> {


Using hitTestForEvent: isn't a good place to do this. It will be called multiple times, and possibly not when you expect it to be (ie: not just for NSLeftMouseDown).

You still probably want to return NSCellHitTrackableArea when the user hits a link, but do the actual URL opening in trackMouse:inRect:ofView:untilMouseUp:

-corbin



_______________________________________________

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

References: 
 >Hyperlinks in Table Views (From: David Doyle <email@hidden>)
 >Re: Hyperlinks in Table Views (From: Jerry Krinock <email@hidden>)
 >RE: Hyperlinks in Table Views (From: David Doyle <email@hidden>)

  • Prev by Date: Re: Ellipsis + Proper Expansion Frame + HScroll-Edit in 10.6 NSTableView (was "Clipped Tooltip")
  • Next by Date: 10.6 : Class xxx does not implement the 'NSWindowDelegate' protocol
  • Previous by thread: RE: Hyperlinks in Table Views
  • Next by thread: iPhone: CGPathMutable updating?
  • Index(es):
    • Date
    • Thread