• 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: detecting NSTableView selected line number with bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting NSTableView selected line number with bindings


  • Subject: Re: detecting NSTableView selected line number with bindings
  • From: SA Dev <email@hidden>
  • Date: Wed, 18 May 2005 06:17:12 -0400


Well, it depends on what you want to do with it and when you actually want to know. It's important to note that [myTableView selectedRow] maps to the object's index in the array controller's - arrangedObjects array. If you ask its content array directly, it's very likely not to match the order represented in the table view. I know this very well because I've stepped on the same rake so often I have a permanent indentation on my forehead. ;-)


Of course if you're trying to figure out the selected object, just ask the array controller directly for its -selectedObjects.



On May 18, 2005, at 3:44 AM, Steven Kramer wrote:


Op 18-mei-05 om 1:10 heeft Denis Stanton het volgende geschreven:


I'm new to bindings and I can't figure out how to detect the index of the selected line.




Denis, you probably need to subscribe to a notification or implement the delegate method tableViewSelectionDidChange:

Regards,

Steven Kramer

--
email@hidden
http://www.sprintteam.nl/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >detecting NSTableView selected line number with bindings (From: Denis Stanton <email@hidden>)
 >Re: detecting NSTableView selected line number with bindings (From: Steven Kramer <email@hidden>)

  • Prev by Date: Re: CoreData and arrays owned by arrays...
  • Next by Date: Re: Menu bar WITHOUT dock icon?
  • Previous by thread: Re: detecting NSTableView selected line number with bindings
  • Next by thread: NSBezierPath question?
  • Index(es):
    • Date
    • Thread