without using bindings

Hi all,
I want to build a simple application without using bindings (because I want to learn to write code).

Interface:
one NSTableView, two NSButtons
The table view should have two columns: Name and City.
The two buttons should be “Add Person” and “Remove Person”.

I want to add a person (and city of that person) using the “Add Person” button and remove them with “Remove Person”.

I don’t want you to write the code for me. I want to know the steps.
Thanks.

It depends a bit on how you’re storing the table data. Somewhere you will have a property holding a list of either records or classes that represent rows of the table, and you will need to either add or delete them, then tell the table it needs updating.

But there are plenty of other places to learn to write code that don’t involve doing things the hard way.

Thanks for the reply.
Basically, i want to learn how to put data into NSTableView when NSTableView has more than one column. (I want to put data using “Add” NSButton). If its too difficult to do without bindings then I will use bindings.

You have to implement the appropriate table view delegate methods, and then modify the variable that holds the values.

I wouldn’t call it too difficult, just needlessly cumbersome.