title: NSTableView is not showing my data. Why is that happening?
body: <p>I'm making a "simple" to-do-list project and running into a few bumps in the road. The problem is that my NSTableView is NOT showing the data from the NSMutableArray "myArray" and I don't know why that is. Can someone point out my mistake?</p>
  
  <pre><code>/*
   IBOutlet NSTextField *textField;
   IBOutlet NSTabView *tableView;
   IBOutlet NSButton *button;
   NSMutableArray *myArray;
   */
  
  #import "AppController.h"
  
  
  @implementation AppController
  
  
  -(IBAction)addNewItem:(id)sender
  {
  
      NSString *myString = [textField stringValue];
  
      NSLog(@"my stirng is %@",myString);
      myArray = [[NSMutableArray alloc] initWithCapacity:100];
      [myArray addObject:myString];
  
  }
  
  - (int)numberOfRowsInTableView:(NSTableView *)aTableView
  {
      return [myArray count];
  }
  - (id)tableView:(NSTableView *)aTableView
  objectValueForTableColumn:(NSTableColumn *)aTableColumn
              row:(int)rowIndex
  {
  
      return [myArray objectAtIndex:rowIndex];
  }
  
  -(id)init
  {
      [super init];
      [tableView setDataSource:self];
      [tableView setDelegate:self];
  
      NSLog(@"init");
      return self;
  }
  
  @end
  </code></pre>