• 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: how do I detect a click in a tableView cell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I detect a click in a tableView cell?


  • Subject: Re: how do I detect a click in a tableView cell?
  • From: Denis Stanton <email@hidden>
  • Date: Mon, 22 Mar 2004 14:49:54 +1200

On 22/03/2004, at 2:32 PM, Allan Odgaard wrote:

> On 22. Mar 2004, at 3:20, Denis Stanton wrote:
>
>> [...] I'm looking at the classes above NSTableView, but I can't find
>> anything to tell me the point location of the click.
>
> Yes, that would seem to be missing -- the reason is that this
> functionality is conveniently implemented by NSApplication. You can
> send currentEvent to your NSApp to receive it. Then use
> locationInWindow (NSEvent) and convertPoint:fromView: (NSView) to
> convert the point to be relative to your table view.
>

Thanks again. I had figured out that that I was missing was a way to
get at the -event-. I was expecting to find the point location in the
sender parameter passed in the IBAction. I didn't know how to shift
from thinking about the Action to obtaining the event.

[NSApp currentEvent] seems to be what I need

Denis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >how do I detect a click in a tableView cell? (From: Denis Stanton <email@hidden>)
 >Re: how do I detect a click in a tableView cell? (From: Allan Odgaard <email@hidden>)
 >Re: how do I detect a click in a tableView cell? (From: Denis Stanton <email@hidden>)
 >Re: how do I detect a click in a tableView cell? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: NSTextView offset of text at top of view
  • Next by Date: When to register binding transformers (applicationDidFinishLaunching)?
  • Previous by thread: Re: how do I detect a click in a tableView cell?
  • Next by thread: [Q] How to detect missing storage allocation?
  • Index(es):
    • Date
    • Thread