I am trying to create a very simple application. I have two text fields, a button, and a tableview. I downloaded an example. but I still do not really understand how to do this: How do you add the contents of those two text fields to the table? Or rather, how do you get the table to do anything?
For ease, I use in this example first and last names. Names should be entered, and the table will just list them together, and in order. I downloaded that, “Summer in Florida” thing, but I do not understand. I performed a search and noticed that a lot of people were having similar problems. Maybe if someone answers here, nobody will have to answer this question, or any like it again.
The Florida example uses bindings for the table contents. The script has a variable that contains a list of records – each record represents a row of the table.
When you change the value of the variable, the table reflects the change – that’s what bindings do. So if you change the variable so that it contains another record, it will appear as another row in the table.
The bindings are set up in Interface Builder using the Bindings panel of the Inspector. You bind the variable to an array controller (think of it as a go-between) and the array controller to the columns of the table.