3

I am having some difficulty trying to use checkboxes as the selectedIndex in a view based table.

There is good documentation on view based table here: [View Based Tables ]

However, I after searching and looking on Stackoverflow I can't seem to get my implementation for doing the following.

My view is a table that makes a callout to Yahoo Finance. The table is view based constructed with bindings.

When the table is populated I want to have a check box against each row so that when the user clicks the check box, that row will be updated from Yahoo. Currently this works using multi or single selection using the table view and an observer.. I want to do this with the checkboxes and a button that gets all the checked rows.

Table Setup

The IB setup is as follows: IB Setup

What is the best way to get the rows where the checkbox is selected? Should I use the array controller or do I need to do something with the table?

Axwack
  • 569
  • 1
  • 8
  • 26

1 Answers1

0

Assuming that you use a NSArray of NSDictionaries as your data model, why not add a key/value pair to each "stock" dictionary as a flag? Then in your button action method, just iterate through the data model and trigger an update when the flag is set. Bindings do the rest!

bijan
  • 1,675
  • 18
  • 30