how to write a tableview for mac os x