0

I'm trying to build a hello world application with Xcode 4.3.

So far, I have a TableView (dragged and dropped from the objects list) and a TableViewCell (also dragged and dropped from the objects list).

I have an array too, and my TableView works and gets the data from array, but how can I reload the TableView's data? I tried [self.tableView reloadData]; but it doesn't work. When I type [self., tableView is not in my options...

Ry-
  • 218,210
  • 55
  • 464
  • 476
invader7
  • 452
  • 1
  • 5
  • 11

1 Answers1

0

To have the NSTableView as a property of your class, you have to declare it as one.

In the interface of your class add:

@property (weak) IBOutlet NSTableView *tableView;

In the implementation add:

@synthesize tableView;

Then in Interface Builder connect the table view to the tableView outlet of your class, by right clicking on "File's Owner" and dragging a line from "tableView" to your table view.

bijan
  • 1,675
  • 18
  • 30
  • Great !! thank you very much , i changed NSTableView *tableView; to UITableView *mytableView; and then [self.mytableview reloadData]; did the work !!! thanks ! – invader7 Jun 05 '12 at 21:43
  • 1
    @invader7: You should accept the answer if it worked for you. – Ry- Jun 06 '12 at 02:11