• 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: NSTableView bindings and current selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView bindings and current selection


  • Subject: Re: NSTableView bindings and current selection
  • From: Benjamin Stiglitz <email@hidden>
  • Date: Mon, 8 Sep 2008 15:34:24 -0400

I have a tableView (showing query results) that has its values bound to an array controller; that works fine. I also have a NSPathControl showing the path of the selected item; this works fine too. I have implemented a right-click contextual menu to "Show in Finder..." the selected item in the tableView.
My question is, how do I get the path of the selected item so my showInFinderMenuAction: method does as it's supposed to do?
To be totally honest, even though I have got the menu working (it's a menuForEvent:theEvent method) and I can log the selected row correctly, I'm unsure of what to do next to implement the contextual menu.
As the tableView implements bindings, I can't see a way of getting the selected items row/column value, let alone that row's path reference.

You can get the clickedRow of the table view, and use that as an index into the array controller’s arranged content. (Be sure to use the clicked row, not the array controller’s selection, unless you change the selection itself on the right-click).


-Ben_______________________________________________

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: 
 >NSTableView bindings and current selection (From: Jason Wiggins <email@hidden>)

  • Prev by Date: SSCrypto to PHP
  • Next by Date: Re: NSTableView bindings and current selection
  • Previous by thread: NSTableView bindings and current selection
  • Next by thread: Re: NSTableView bindings and current selection
  • Index(es):
    • Date
    • Thread