Programmatically Retrieving TableView Selections

Discussion in 'Mac Programming' started by elzorro, Feb 13, 2010.

  1. elzorro macrumors newbie

    Nov 8, 2009
    I'm trying to make a Core Data app in which when you select one "Player" in a TableView, and a list of all teammates appears in a second tableView, with a column for how many times those two players have played together.

    This has got me completely stuck, because while I know how to fill up a table from a normal array, using ArrayControllers and Core Data has really cluttered up my view of the situation, plus I don't know how to retrieve an Object ID of the current selection.

    So to summarize: How to make a button-activated bit of code that is aware of both the current selection in one TableView, as well as the object being represented in the current row of another TableView.

    I'd really appreciate the help, so far I've never had a question answered here, and learning alone is very difficult.
  2. JoshDC macrumors regular

    Apr 8, 2009
    Have you tried NSArrayController's selectedObjects method?

Share This Page